[gtk+/wip/william/deprecations: 3/10] mir: fix set_surface_state and set_surface_type



commit c6a1be085cd9b4f12723b8deefc9c101aadf8b33
Author: William Hua <william hua canonical com>
Date:   Thu Feb 23 13:46:42 2017 -0500

    mir: fix set_surface_state and set_surface_type

 gdk/mir/gdkmir-private.h   |    4 ++--
 gdk/mir/gdkmirwindowimpl.c |   17 +++++++++--------
 2 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/gdk/mir/gdkmir-private.h b/gdk/mir/gdkmir-private.h
index 8b01e58..8b8835a 100644
--- a/gdk/mir/gdkmir-private.h
+++ b/gdk/mir/gdkmir-private.h
@@ -87,9 +87,9 @@ MirWindow *_gdk_mir_window_get_mir_window (GdkWindow *window);
 
 GdkWindowImpl *_gdk_mir_window_impl_new (GdkDisplay *display, GdkWindow *window);
 
-void _gdk_mir_window_impl_set_surface_state (GdkMirWindowImpl *impl, MirSurfaceState state);
+void _gdk_mir_window_impl_set_surface_state (GdkMirWindowImpl *impl, MirWindowState state);
 
-void _gdk_mir_window_impl_set_surface_type (GdkMirWindowImpl *impl, MirSurfaceType type);
+void _gdk_mir_window_impl_set_surface_type (GdkMirWindowImpl *impl, MirWindowType type);
 
 void _gdk_mir_window_set_surface_output (GdkWindow *window, gdouble scale);
 
diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c
index e09fcbb..61452a9 100644
--- a/gdk/mir/gdkmirwindowimpl.c
+++ b/gdk/mir/gdkmirwindowimpl.c
@@ -92,7 +92,7 @@ struct _GdkMirWindowImpl
 
   /* Desired surface attributes */
   GdkWindowTypeHint type_hint;
-  MirSurfaceState surface_state;
+  MirWindowState window_state;
   gboolean modal;
 
   /* Current button state for checking which buttons are being pressed / released */
@@ -219,14 +219,15 @@ _gdk_mir_window_impl_new (GdkDisplay *display, GdkWindow *window)
 }
 
 void
-_gdk_mir_window_impl_set_surface_state (GdkMirWindowImpl *impl, MirSurfaceState state)
+_gdk_mir_window_impl_set_surface_state (GdkMirWindowImpl *impl,
+                                        MirWindowState    state)
 {
-  impl->surface_state = state;
+  impl->window_state = state;
 }
 
 void
 _gdk_mir_window_impl_set_surface_type (GdkMirWindowImpl *impl,
-                                       MirSurfaceType    type)
+                                       MirWindowType     type)
 {
 }
 
@@ -265,19 +266,19 @@ gdk_mir_window_impl_init (GdkMirWindowImpl *impl)
 {
   impl->properties = g_hash_table_new_full (NULL, NULL, NULL, gdk_mir_property_free);
   impl->type_hint = GDK_WINDOW_TYPE_HINT_NORMAL;
-  impl->surface_state = mir_surface_state_unknown;
+  impl->window_state = mir_surface_state_unknown;
   impl->output_scale = 1;
 }
 
 static void
 set_surface_state (GdkMirWindowImpl *impl,
-                   MirSurfaceState state)
+                   MirWindowState    state)
 {
   MirConnection *connection = gdk_mir_display_get_mir_connection (impl->display);
-  if (impl->surface_state == state)
+  if (impl->window_state == state)
     return;
 
-  impl->surface_state = state;
+  impl->window_state = state;
   if (impl->surface && !impl->pending_spec_update)
     {
       MirSurfaceSpec *spec = mir_connection_create_spec_for_changes (connection);


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