[gtk+] GDK-Win32: Make update_stye_bits() available within the backend



commit 15c9b3e69271364016832eabb1bb0137bb3d7f53
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue Mar 8 13:00:49 2016 +0800

    GDK-Win32: Make update_stye_bits() available within the backend
    
    Other portions of the GDK-Win32 backend make use of this function as
    layered windows need to be disabled for GL windows and possibly other
    parts, so make this function a private function that is available within
    the backend.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763285

 gdk/win32/gdkglcontext-win32.c |    4 ++--
 gdk/win32/gdkwindow-win32.c    |   21 ++++++++++-----------
 gdk/win32/gdkwindow-win32.h    |    2 ++
 3 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/gdk/win32/gdkglcontext-win32.c b/gdk/win32/gdkglcontext-win32.c
index af82903..520d253 100644
--- a/gdk/win32/gdkglcontext-win32.c
+++ b/gdk/win32/gdkglcontext-win32.c
@@ -75,7 +75,7 @@ _gdk_win32_gl_context_dispose (GObject *gobject)
        * trigger update_style_bits() to enable layered windows again
        */
       if (impl->suppress_layered == 0)
-        gdk_window_set_type_hint (window, gdk_window_get_type_hint (window));
+        _gdk_win32_window_update_style_bits (window);
     }
 
   G_OBJECT_CLASS (gdk_win32_gl_context_parent_class)->dispose (gobject);
@@ -527,7 +527,7 @@ _gdk_win32_gl_context_realize (GdkGLContext *context,
    * disable layered windows by triggering update_style_bits()
    */
   if (impl->suppress_layered == 1)
-    gdk_window_set_type_hint (window, gdk_window_get_type_hint (window));
+    _gdk_win32_window_update_style_bits (window);
 
   return TRUE;
 }
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 0bdb3c3..847d878 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -67,7 +67,6 @@ struct _FullscreenInfo
  */
 #define SWP_NOZORDER_SPECIFIED HWND_TOP
 
-static void     update_style_bits         (GdkWindow         *window);
 static gboolean _gdk_window_get_functions (GdkWindow         *window,
                                            GdkWMFunction     *functions);
 static HDC     _gdk_win32_impl_acquire_dc (GdkWindowImplWin32 *impl);
@@ -1845,7 +1844,7 @@ gdk_win32_window_set_geometry_hints (GdkWindow         *window,
       GDK_NOTE (MISC, g_print ("... GRAVITY: %d\n", geometry->win_gravity));
     }
 
-  update_style_bits (window);
+  _gdk_win32_window_update_style_bits (window);
 }
 
 static void
@@ -2559,7 +2558,7 @@ _gdk_win32_window_lacks_wm_decorations (GdkWindow *window)
       return FALSE;
     }
 
-  /* Keep this in sync with update_style_bits() */
+  /* Keep this in sync with _gdk_win32_window_update_style_bits() */
   /* We don't check what get_effective_window_decorations()
    * has to say, because it gives suggestions based on
    * various hints, while we want *actual* decorations,
@@ -2577,8 +2576,8 @@ _gdk_win32_window_lacks_wm_decorations (GdkWindow *window)
   return !has_any_decorations;
 }
 
-static void
-update_style_bits (GdkWindow *window)
+void
+_gdk_win32_window_update_style_bits (GdkWindow *window)
 {
   GdkWindowImplWin32 *impl = (GdkWindowImplWin32 *)window->impl;
   GdkWMDecoration decorations;
@@ -2657,14 +2656,14 @@ update_style_bits (GdkWindow *window)
 
   if (old_style == new_style && old_exstyle == new_exstyle )
     {
-      GDK_NOTE (MISC, g_print ("update_style_bits: %p: no change\n",
+      GDK_NOTE (MISC, g_print ("_gdk_win32_window_update_style_bits: %p: no change\n",
                               GDK_WINDOW_HWND (window)));
       return;
     }
 
   if (old_style != new_style)
     {
-      GDK_NOTE (MISC, g_print ("update_style_bits: %p: STYLE: %s => %s\n",
+      GDK_NOTE (MISC, g_print ("_gdk_win32_window_update_style_bits: %p: STYLE: %s => %s\n",
                               GDK_WINDOW_HWND (window),
                               _gdk_win32_window_style_to_string (old_style),
                               _gdk_win32_window_style_to_string (new_style)));
@@ -2674,7 +2673,7 @@ update_style_bits (GdkWindow *window)
 
   if (old_exstyle != new_exstyle)
     {
-      GDK_NOTE (MISC, g_print ("update_style_bits: %p: EXSTYLE: %s => %s\n",
+      GDK_NOTE (MISC, g_print ("_gdk_win32_window_update_style_bits: %p: EXSTYLE: %s => %s\n",
                               GDK_WINDOW_HWND (window),
                               _gdk_win32_window_exstyle_to_string (old_exstyle),
                               _gdk_win32_window_exstyle_to_string (new_exstyle)));
@@ -2772,7 +2771,7 @@ gdk_win32_window_set_decorations (GdkWindow      *window,
 
   *impl->decorations = decorations;
 
-  update_style_bits (window);
+  _gdk_win32_window_update_style_bits (window);
 }
 
 static gboolean
@@ -3476,7 +3475,7 @@ gdk_win32_window_unfullscreen (GdkWindow *window)
 
       g_object_set_data (G_OBJECT (window), "fullscreen-info", NULL);
       g_free (fi);
-      update_style_bits (window);
+      _gdk_win32_window_update_style_bits (window);
     }
 }
 
@@ -3676,7 +3675,7 @@ gdk_win32_window_set_type_hint (GdkWindow        *window,
 
   ((GdkWindowImplWin32 *)window->impl)->type_hint = hint;
 
-  update_style_bits (window);
+  _gdk_win32_window_update_style_bits (window);
 }
 
 static GdkWindowTypeHint
diff --git a/gdk/win32/gdkwindow-win32.h b/gdk/win32/gdkwindow-win32.h
index a337e10..c8ddd14 100644
--- a/gdk/win32/gdkwindow-win32.h
+++ b/gdk/win32/gdkwindow-win32.h
@@ -190,6 +190,8 @@ void  _gdk_win32_window_tmp_reset_bg  (GdkWindow *window,
 void  _gdk_win32_window_tmp_unset_parent_bg (GdkWindow *window);
 void  _gdk_win32_window_tmp_reset_parent_bg (GdkWindow *window);
 
+void  _gdk_win32_window_update_style_bits   (GdkWindow *window);
+
 G_END_DECLS
 
 #endif /* __GDK_WINDOW_WIN32_H__ */


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