[gtk+/wip/xdg-shell-props: 1/2] xdg-shell: Update for focused_set / focused_unset rename



commit 7fbcff8d71a1a12b39bc55c15e4e93f0963ecdea
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Feb 9 11:31:54 2014 -0500

    xdg-shell: Update for focused_set / focused_unset rename

 gdk/wayland/gdkwindow-wayland.c    |   12 ++++++------
 gdk/wayland/protocol/xdg-shell.xml |   31 ++++++++++++++++---------------
 2 files changed, 22 insertions(+), 21 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index b799803..b0772b5 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -975,16 +975,16 @@ xdg_surface_request_unset_maximized (void *data,
 }
 
 static void
-xdg_surface_focused_set (void *data,
-                         struct xdg_surface *xdg_surface)
+xdg_surface_activated (void *data,
+                       struct xdg_surface *xdg_surface)
 {
   GdkWindow *window = GDK_WINDOW (data);
   gdk_synthesize_window_state (window, 0, GDK_WINDOW_STATE_FOCUSED);
 }
 
 static void
-xdg_surface_focused_unset (void *data,
-                           struct xdg_surface *xdg_surface)
+xdg_surface_deactivated (void *data,
+                         struct xdg_surface *xdg_surface)
 {
   GdkWindow *window = GDK_WINDOW (data);
   gdk_synthesize_window_state (window, GDK_WINDOW_STATE_FOCUSED, 0);
@@ -1014,8 +1014,8 @@ static const struct xdg_surface_listener xdg_surface_listener = {
   xdg_surface_request_unset_fullscreen,
   xdg_surface_request_set_maximized,
   xdg_surface_request_unset_maximized,
-  xdg_surface_focused_set,
-  xdg_surface_focused_unset,
+  xdg_surface_activated,
+  xdg_surface_deactivated,
   xdg_surface_delete,
 };
 
diff --git a/gdk/wayland/protocol/xdg-shell.xml b/gdk/wayland/protocol/xdg-shell.xml
index ef755b7..4a1d08a 100644
--- a/gdk/wayland/protocol/xdg-shell.xml
+++ b/gdk/wayland/protocol/xdg-shell.xml
@@ -249,12 +249,6 @@
        ignore it if it doesn't resize, pick a smaller size (to
        satisfy aspect ratio or resize in steps of NxM pixels).
 
-       The edges parameter provides a hint about how the surface
-       was resized. The client may use this information to decide
-       how to adjust its content to the new size (e.g. a scrolling
-       area might adjust its content position to leave the viewable
-       content unmoved). Valid edge values are from resize_edge enum.
-
        The client is free to dismiss all but the last configure
        event it received.
 
@@ -391,18 +385,25 @@
       </description>
     </request>
 
-    <event name="focused_set">
-      <description summary="surface was focused">
-       The focused_set event is sent when this surface has been
-       activated. Window decorations should be updated accordingly.
+    <event name="activated">
+      <description summary="surface was activated">
+       The activated_set event is sent when this surface has been
+       activated, which means that the surface has user attention.
+        Window decorations should be updated accordingly. You should
+        not use this event for anything but the style of decorations
+        you display, use wl_keyboard.enter and wl_keyboard.leave for
+        determining keyboard focus.
       </description>
     </event>
 
-    <event name="focused_unset">
-      <description summary="surface was unfocused">
-       The focused_unset event is sent when this surface has been
-       deactivated, because another surface has been activated. Window
-       decorations should be updated accordingly.
+    <event name="deactivated">
+      <description summary="surface was deactivated">
+       The deactivate event is sent when this surface has been
+        deactivated, which means that the surface lost user attention.
+        Window decorations should be updated accordingly. You should
+        not use this event for anything but the style of decorations
+        you display, use wl_keyboard.enter and wl_keyboard.leave for
+        determining keyboard focus.
       </description>
     </event>
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]