diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-07-28 15:01:22 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-24 14:44:41 +0100 |
commit | 193985a05fe4b27bc0c4a6b9b482f9b1623dcec0 (patch) | |
tree | 2cf77bf64a1a9a149baef3019aa0d7464d103306 /chromium/ui | |
parent | cc82bdb44ede43e09f75251d97aa21d71003c426 (diff) | |
download | qtwebengine-chromium-193985a05fe4b27bc0c4a6b9b482f9b1623dcec0.tar.gz |
<chromium> Allow overriding GetXDisplay
This allows Chromium to fetch the XDisplay owned by Qt instead of a
new one. We were previously overriding MessagePumpForUI::GetDefaultXDisplay
but this was removed along with the switch to Aura.
Change-Id: I9fb53c8cc955f124d88ad0e6ca690f88e816847e
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Reviewed-by: Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com>
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'chromium/ui')
-rw-r--r-- | chromium/ui/gfx/x/x11_types.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chromium/ui/gfx/x/x11_types.cc b/chromium/ui/gfx/x/x11_types.cc index 263b7852a12..016031bfce7 100644 --- a/chromium/ui/gfx/x/x11_types.cc +++ b/chromium/ui/gfx/x/x11_types.cc @@ -10,13 +10,21 @@ #include "build/build_config.h" #include "ui/gfx/x/x11_switches.h" +#ifdef TOOLKIT_QT +extern XDisplay* GetQtXDisplay(); +#endif + namespace gfx { XDisplay* GetXDisplay() { +#ifdef TOOLKIT_QT + return GetQtXDisplay(); +#else static XDisplay* display = NULL; if (!display) display = OpenNewXDisplay(); return display; +#endif } XDisplay* OpenNewXDisplay() { |