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; |
} |