diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 269: NativeStateWayland: Apply patch from jbkonno to support resize properly.

Message ID 20130429161114.1506.31671.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Jesse Barker April 29, 2013, 4:11 p.m. UTC
------------------------------------------------------------
revno: 269
committer: Jesse Barker <jesse.barker@linaro.org>
branch nick: trunk
timestamp: Mon 2013-04-29 09:07:13 -0700
message:
  NativeStateWayland:  Apply patch from jbkonno to support resize properly.
modified:
  src/native-state-wayland.cpp


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'src/native-state-wayland.cpp'
--- src/native-state-wayland.cpp	2013-04-04 16:53:33 +0000
+++ src/native-state-wayland.cpp	2013-04-29 16:07:13 +0000
@@ -116,13 +116,17 @@ 
 
 void
 NativeStateWayland::output_handle_mode(void *data, struct wl_output * /*wl_output*/,
-                                       uint32_t /*flags*/, int32_t width, int32_t height,
+                                       uint32_t flags, int32_t width, int32_t height,
                                        int32_t refresh)
 {
-    struct my_output *my_output = static_cast<struct my_output *>(data);
-    my_output->width = width;
-    my_output->height = height;
-    my_output->refresh = refresh;
+    /* Only handle output mode events for the shell's "current" mode */
+    if (flags & WL_OUTPUT_MODE_CURRENT) {
+        struct my_output *my_output = static_cast<struct my_output *>(data);
+
+        my_output->width = width;
+        my_output->height = height;
+        my_output->refresh = refresh;
+    }
 }
 
 void