[gtk+] window: Don't keep 2 type hints



commit 8a238c78862630ce5d9678635ed34356c65965d5
Author: Benjamin Otte <otte redhat com>
Date:   Sun Jul 19 04:32:48 2015 +0200

    window: Don't keep 2 type hints
    
    1. This confuses the code as it's using the old type hint with the new
    type hint on GDK window creation
    
    2. It only existed as a workaround for old code that directly accessed
    window->type_hint which hasn't been possible since 3.0.

 gtk/gtkwindow.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 232d1c1..6889455 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -163,7 +163,6 @@ struct _GtkWindowPrivate
   GList                 *popovers;
 
   GdkModifierType        mnemonic_modifier;
-  GdkWindowTypeHint      gdk_type_hint;
 
   gchar   *startup_id;
   gchar   *title;
@@ -1630,7 +1629,6 @@ gtk_window_init (GtkWindow *window)
   priv->need_default_size = TRUE;
   priv->need_default_position = TRUE;
   priv->modal = FALSE;
-  priv->gdk_type_hint = GDK_WINDOW_TYPE_HINT_NORMAL;
   priv->gravity = GDK_GRAVITY_NORTH_WEST;
   priv->decorated = TRUE;
   priv->mnemonic_modifier = GDK_MOD1_MASK;
@@ -3509,13 +3507,9 @@ gtk_window_set_type_hint (GtkWindow           *window,
 
   priv = window->priv;
 
-  if (hint < GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU)
-    priv->type_hint = hint;
-  else
-    priv->type_hint = GDK_WINDOW_TYPE_HINT_NORMAL;
+  priv->type_hint = hint;
 
   priv->reset_type_hint = TRUE;
-  priv->gdk_type_hint = hint;
 
   update_window_buttons (window);
 }
@@ -3533,7 +3527,7 @@ gtk_window_get_type_hint (GtkWindow *window)
 {
   g_return_val_if_fail (GTK_IS_WINDOW (window), GDK_WINDOW_TYPE_HINT_NORMAL);
 
-  return window->priv->gdk_type_hint;
+  return window->priv->type_hint;
 }
 
 /**
@@ -6122,7 +6116,7 @@ gtk_window_map (GtkWidget *widget)
        * Some applications use X directly to change the properties;
        * in that case, we shouldn't overwrite what they did.
        */
-      gdk_window_set_type_hint (gdk_window, priv->gdk_type_hint);
+      gdk_window_set_type_hint (gdk_window, priv->type_hint);
       priv->reset_type_hint = FALSE;
     }
 


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