Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Unified Diff: ui/platform_window/x11/x11_window_base.cc

Issue 2683033006: Move SetUseOverrideRedirectWindowByDefault() to //ui/base. (Closed)
Patch Set: g_use_test_config. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/platform_window/x11/x11_window_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/platform_window/x11/x11_window_base.cc
diff --git a/ui/platform_window/x11/x11_window_base.cc b/ui/platform_window/x11/x11_window_base.cc
index 7d72b246db55a877448713de45bf7b65ae97b794..db251915c4e1ffda1bc0c77981c0492ed96dcfa5 100644
--- a/ui/platform_window/x11/x11_window_base.cc
+++ b/ui/platform_window/x11/x11_window_base.cc
@@ -12,6 +12,7 @@
#include <string>
#include "base/strings/utf_string_conversions.h"
+#include "ui/base/platform_window_defaults.h"
#include "ui/base/x/x11_window_event_manager.h"
#include "ui/events/devices/x11/touch_factory_x11.h"
#include "ui/events/event.h"
@@ -30,8 +31,6 @@ const char* kAtomsToCache[] = {"UTF8_STRING", "WM_DELETE_WINDOW",
"_NET_WM_NAME", "_NET_WM_PID",
"_NET_WM_PING", NULL};
-bool g_override_redirect = false;
-
XID FindXEventTarget(const XEvent& xev) {
XID target = xev.xany.window;
if (xev.type == GenericEvent)
@@ -78,7 +77,7 @@ void X11WindowBase::Create() {
memset(&swa, 0, sizeof(swa));
swa.background_pixmap = None;
swa.bit_gravity = NorthWestGravity;
- swa.override_redirect = g_override_redirect;
+ swa.override_redirect = UseTestConfigForPlatformWindows();
xwindow_ =
XCreateWindow(xdisplay_, xroot_window_, bounds_.x(), bounds_.y(),
bounds_.width(), bounds_.height(),
@@ -304,11 +303,4 @@ void X11WindowBase::ProcessXWindowEvent(XEvent* xev) {
}
}
-namespace test {
-
-void SetUseOverrideRedirectWindowByDefault(bool override_redirect) {
- g_override_redirect = override_redirect;
-}
-
-} // namespace test
} // namespace ui
« no previous file with comments | « ui/platform_window/x11/x11_window_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698