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

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: fixed double-notification for node bounds changes Created 6 years, 5 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 | « mojo/services/gles2/command_buffer_impl.cc ('k') | mojo/services/view_manager/node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..766f4d2948a82e7da7853011a8fcf88d1b05be9c 100644
--- a/mojo/services/native_viewport/native_viewport_x11.cc
+++ b/mojo/services/native_viewport/native_viewport_x11.cc
@@ -7,6 +7,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
+#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
#include "ui/events/event.h"
#include "ui/events/event_utils.h"
@@ -133,6 +134,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 +161,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;
}
« no previous file with comments | « mojo/services/gles2/command_buffer_impl.cc ('k') | mojo/services/view_manager/node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698