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

Unified Diff: mojo/services/native_viewport/native_viewport_x11.cc

Issue 354933002: Connect X11 ConfigureNotify events to Mojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed X11 support for --start-fullscreen, --start-maximized Created 6 years, 6 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
Index: mojo/services/native_viewport/native_viewport_x11.cc
diff --git a/mojo/services/native_viewport/native_viewport_x11.cc b/mojo/services/native_viewport/native_viewport_x11.cc
index d47e16afe191664f21fd689634cfb5524a68eaf8..dff5fc74dcaf4542a00217908ac9f44824f2e12a 100644
--- a/mojo/services/native_viewport/native_viewport_x11.cc
+++ b/mojo/services/native_viewport/native_viewport_x11.cc
@@ -7,7 +7,9 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
+#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
+#include "mojo/shell/switches.h"
Ben Goodger (Google) 2014/07/08 15:41:57 doesn't look like you need either of these #includ
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
#include "ui/events/platform/platform_event_dispatcher.h"
@@ -133,6 +135,7 @@ class NativeViewportX11 : public NativeViewport,
case ButtonPress:
case ButtonRelease:
case MotionNotify:
+ case ConfigureNotify:
return true;
case ClientMessage:
return event->xclient.message_type == atom_wm_protocols_;
@@ -159,6 +162,9 @@ class NativeViewportX11 : public NativeViewport,
ui::MouseEvent mouse_event(event);
delegate_->OnEvent(&mouse_event);
}
+ } else if (event->type == ConfigureNotify) {
+ bounds_ = gfx::Rect(event->xconfigure.width, event->xconfigure.height);
+ delegate_->OnBoundsChanged(bounds_);
}
return ui::POST_DISPATCH_NONE;
}

Powered by Google App Engine
This is Rietveld 408576698