Blame marco_revert-GTK_FRAME_EXTENTS-commits.patch

Wolfgang Ulbrich 68893e6
diff -upr marco/src/core/atomnames.h marco-test-master/src/core/atomnames.h
Wolfgang Ulbrich 68893e6
--- marco/src/core/atomnames.h	2015-10-06 17:15:54.909757371 +0200
Wolfgang Ulbrich 68893e6
+++ marco-test-master/src/core/atomnames.h	2015-10-23 17:19:23.373005831 +0200
Wolfgang Ulbrich 68893e6
@@ -58,7 +58,6 @@ item(_MARCO_RESTART_MESSAGE)
Wolfgang Ulbrich 68893e6
 item(_MARCO_RELOAD_THEME_MESSAGE)
Wolfgang Ulbrich 68893e6
 item(_MARCO_SET_KEYBINDINGS_MESSAGE)
Wolfgang Ulbrich 68893e6
 item(_MARCO_TOGGLE_VERBOSE)
Wolfgang Ulbrich 68893e6
-item(_GTK_FRAME_EXTENTS)
Wolfgang Ulbrich 68893e6
 item(_MATE_PANEL_ACTION)
Wolfgang Ulbrich 68893e6
 item(_MATE_PANEL_ACTION_MAIN_MENU)
Wolfgang Ulbrich 68893e6
 item(_MATE_PANEL_ACTION_RUN_DIALOG)
Wolfgang Ulbrich 68893e6
@@ -71,6 +70,7 @@ item(MULTIPLE)
Wolfgang Ulbrich 68893e6
 item(TIMESTAMP)
Wolfgang Ulbrich 68893e6
 item(VERSION)
Wolfgang Ulbrich 68893e6
 item(ATOM_PAIR)
Wolfgang Ulbrich 68893e6
+item(_GTK_FRAME_EXTENTS)
Wolfgang Ulbrich 68893e6
 
Wolfgang Ulbrich 68893e6
 /* Oddities: These are used, and we need atoms for them,
Wolfgang Ulbrich 68893e6
  * but when we need all _NET_WM hints (i.e. when we're making
Wolfgang Ulbrich 68893e6
diff -upr marco/src/core/constraints.c marco-test-master/src/core/constraints.c
Wolfgang Ulbrich 68893e6
--- marco/src/core/constraints.c	2015-10-06 17:15:54.910757381 +0200
Wolfgang Ulbrich 68893e6
+++ marco-test-master/src/core/constraints.c	2015-10-23 17:20:37.214737879 +0200
Wolfgang Ulbrich 68893e6
@@ -437,7 +437,7 @@ setup_constraint_info (ConstraintInfo
Wolfgang Ulbrich 68893e6
    */
Wolfgang Ulbrich 68893e6
 
Wolfgang Ulbrich 68893e6
   if (meta_prefs_get_force_fullscreen() &&
Wolfgang Ulbrich 68893e6
-      (window->decorated || !meta_window_is_client_decorated (window)) &&
Wolfgang Ulbrich 68893e6
+      window->decorated &&
Wolfgang Ulbrich 68893e6
       meta_rectangle_equal (new, &xinerama_info->rect) &&
Wolfgang Ulbrich 68893e6
       window->has_fullscreen_func &&
Wolfgang Ulbrich 68893e6
       !window->fullscreen)
Wolfgang Ulbrich 68893e6
diff -upr marco/src/core/window.c marco-test-master/src/core/window.c
Wolfgang Ulbrich 68893e6
--- marco/src/core/window.c	2015-10-23 17:18:23.157406594 +0200
Wolfgang Ulbrich 68893e6
+++ marco-test-master/src/core/window.c	2015-10-23 17:20:41.317778555 +0200
Wolfgang Ulbrich 68893e6
@@ -4058,18 +4058,7 @@ meta_window_get_outer_rect (const MetaWi
Wolfgang Ulbrich 68893e6
   if (window->frame)
Wolfgang Ulbrich 68893e6
     *rect = window->frame->rect;
Wolfgang Ulbrich 68893e6
   else
Wolfgang Ulbrich 68893e6
-    {
Wolfgang Ulbrich 68893e6
-        *rect = window->rect;
Wolfgang Ulbrich 68893e6
-
Wolfgang Ulbrich 68893e6
-	if (window->has_custom_frame_extents)
Wolfgang Ulbrich 68893e6
-	  {
Wolfgang Ulbrich 68893e6
-	    const GtkBorder *extents = &window->custom_frame_extents;
Wolfgang Ulbrich 68893e6
-	    rect->x += extents->left;
Wolfgang Ulbrich 68893e6
-	    rect->y += extents->top;
Wolfgang Ulbrich 68893e6
-	    rect->width -= extents->left + extents->right;
Wolfgang Ulbrich 68893e6
-	    rect->height -= extents->top + extents->bottom;
Wolfgang Ulbrich 68893e6
-	  }
Wolfgang Ulbrich 68893e6
-    }
Wolfgang Ulbrich 68893e6
+    *rect = window->rect;
Wolfgang Ulbrich 68893e6
 }
Wolfgang Ulbrich 68893e6
 
Wolfgang Ulbrich 68893e6
 void
Wolfgang Ulbrich 68893e6
@@ -8468,20 +8457,3 @@ meta_window_is_maximized (MetaWindow *wi
Wolfgang Ulbrich 68893e6
   return META_WINDOW_MAXIMIZED (window);
Wolfgang Ulbrich 68893e6
 }
Wolfgang Ulbrich 68893e6
 
Wolfgang Ulbrich 68893e6
-/**
Wolfgang Ulbrich 68893e6
- * meta_window_is_client_decorated:
Wolfgang Ulbrich 68893e6
- *
Wolfgang Ulbrich 68893e6
- * Check if if the window has decorations drawn by the client.
Wolfgang Ulbrich 68893e6
- * (window->decorated refers only to whether we should add decorations)
Wolfgang Ulbrich 68893e6
- */
Wolfgang Ulbrich 68893e6
-gboolean
Wolfgang Ulbrich 68893e6
-meta_window_is_client_decorated (MetaWindow *window)
Wolfgang Ulbrich 68893e6
-{
Wolfgang Ulbrich 68893e6
-  /* Currently the implementation here is hackish -
Wolfgang Ulbrich 68893e6
-   * has_custom_frame_extents() is set if _GTK_FRAME_EXTENTS is set
Wolfgang Ulbrich 68893e6
-   * to any value even 0. GTK+ always sets _GTK_FRAME_EXTENTS for
Wolfgang Ulbrich 68893e6
-   * client-side-decorated window, even if the value is 0 because
Wolfgang Ulbrich 68893e6
-   * the window is maxized and has no invisible borders or shadows.
Wolfgang Ulbrich 68893e6
-   */
Wolfgang Ulbrich 68893e6
-  return window->has_custom_frame_extents;
Wolfgang Ulbrich 68893e6
-}
Wolfgang Ulbrich 68893e6
diff -upr marco/src/core/window-private.h marco-test-master/src/core/window-private.h
Wolfgang Ulbrich 68893e6
--- marco/src/core/window-private.h	2015-10-23 17:18:23.155406574 +0200
Wolfgang Ulbrich 68893e6
+++ marco-test-master/src/core/window-private.h	2015-10-23 17:20:41.320778585 +0200
Wolfgang Ulbrich 68893e6
@@ -356,9 +356,6 @@ struct _MetaWindow
Wolfgang Ulbrich 68893e6
    */
Wolfgang Ulbrich 68893e6
   MetaRectangle rect;
Wolfgang Ulbrich 68893e6
 
Wolfgang Ulbrich 68893e6
-  gboolean has_custom_frame_extents;
Wolfgang Ulbrich 68893e6
-  GtkBorder custom_frame_extents;
Wolfgang Ulbrich 68893e6
-
Wolfgang Ulbrich 68893e6
   /* The geometry to restore when we unmaximize.  The position is in
Wolfgang Ulbrich 68893e6
    * root window coords, even if there's a frame, which contrasts with
Wolfgang Ulbrich 68893e6
    * window->rect above.  Note that this gives the position and size
Wolfgang Ulbrich 68893e6
@@ -664,8 +661,6 @@ void meta_window_unset_demands_attention
Wolfgang Ulbrich 68893e6
 
Wolfgang Ulbrich 68893e6
 void meta_window_update_icon_now (MetaWindow *window);
Wolfgang Ulbrich 68893e6
 
Wolfgang Ulbrich 68893e6
-gboolean meta_window_is_client_decorated (MetaWindow *window);
Wolfgang Ulbrich 68893e6
-
Wolfgang Ulbrich 68893e6
 void meta_window_update_role (MetaWindow *window);
Wolfgang Ulbrich 68893e6
 void meta_window_update_net_wm_type (MetaWindow *window);
Wolfgang Ulbrich 68893e6
 
Wolfgang Ulbrich 68893e6
diff -upr marco/src/core/window-props.c marco-test-master/src/core/window-props.c
Wolfgang Ulbrich 68893e6
--- marco/src/core/window-props.c	2015-10-06 17:15:54.919757469 +0200
Wolfgang Ulbrich 68893e6
+++ marco-test-master/src/core/window-props.c	2015-10-23 17:20:35.921725060 +0200
Wolfgang Ulbrich 68893e6
@@ -215,66 +215,12 @@ reload_kwm_win_icon (MetaWindow    *wind
Wolfgang Ulbrich 68893e6
   reload_icon (window, window->display->atom__KWM_WIN_ICON);
Wolfgang Ulbrich 68893e6
 }
Wolfgang Ulbrich 68893e6
 
Wolfgang Ulbrich 68893e6
-static gboolean
Wolfgang Ulbrich 68893e6
-gtk_border_equal (GtkBorder *a,
Wolfgang Ulbrich 68893e6
-                  GtkBorder *b)
Wolfgang Ulbrich 68893e6
-{
Wolfgang Ulbrich 68893e6
-  return (a->left == b->left &&
Wolfgang Ulbrich 68893e6
-          a->right == b->right &&
Wolfgang Ulbrich 68893e6
-          a->top == b->top &&
Wolfgang Ulbrich 68893e6
-          a->bottom == b->bottom);
Wolfgang Ulbrich 68893e6
-}
Wolfgang Ulbrich 68893e6
-
Wolfgang Ulbrich 68893e6
-static void
Wolfgang Ulbrich 68893e6
-meta_window_set_custom_frame_extents (MetaWindow *window,
Wolfgang Ulbrich 68893e6
-                                      GtkBorder  *extents)
Wolfgang Ulbrich 68893e6
-{
Wolfgang Ulbrich 68893e6
-  if (extents)
Wolfgang Ulbrich 68893e6
-    {
Wolfgang Ulbrich 68893e6
-      if (window->has_custom_frame_extents && gtk_border_equal (&window->custom_frame_extents, extents))
Wolfgang Ulbrich 68893e6
-        return;
Wolfgang Ulbrich 68893e6
-
Wolfgang Ulbrich 68893e6
-      window->has_custom_frame_extents = TRUE;
Wolfgang Ulbrich 68893e6
-      window->custom_frame_extents = *extents;
Wolfgang Ulbrich 68893e6
-    }
Wolfgang Ulbrich 68893e6
-  else
Wolfgang Ulbrich 68893e6
-    {
Wolfgang Ulbrich 68893e6
-      if (!window->has_custom_frame_extents)
Wolfgang Ulbrich 68893e6
-        return;
Wolfgang Ulbrich 68893e6
-
Wolfgang Ulbrich 68893e6
-      window->has_custom_frame_extents = FALSE;
Wolfgang Ulbrich 68893e6
-      memset (&window->custom_frame_extents, 0, sizeof (window->custom_frame_extents));
Wolfgang Ulbrich 68893e6
-    }
Wolfgang Ulbrich 68893e6
-
Wolfgang Ulbrich 68893e6
-  meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
Wolfgang Ulbrich 68893e6
-}
Wolfgang Ulbrich 68893e6
-
Wolfgang Ulbrich 68893e6
 static void
Wolfgang Ulbrich 68893e6
 reload_gtk_frame_extents (MetaWindow    *window,
Wolfgang Ulbrich 68893e6
                           MetaPropValue *value,
Wolfgang Ulbrich 68893e6
                           gboolean       initial)
Wolfgang Ulbrich 68893e6
 {
Wolfgang Ulbrich 68893e6
-  if (value->type != META_PROP_VALUE_INVALID)
Wolfgang Ulbrich 68893e6
-    {
Wolfgang Ulbrich 68893e6
-      if (value->v.cardinal_list.n_cardinals != 4)
Wolfgang Ulbrich 68893e6
-        {
Wolfgang Ulbrich 68893e6
-          meta_verbose ("_GTK_FRAME_EXTENTS on %s has %d values instead of 4\n",
Wolfgang Ulbrich 68893e6
-                        window->desc, value->v.cardinal_list.n_cardinals);
Wolfgang Ulbrich 68893e6
-        }
Wolfgang Ulbrich 68893e6
-      else
Wolfgang Ulbrich 68893e6
-        {
Wolfgang Ulbrich 68893e6
-          GtkBorder extents;
Wolfgang Ulbrich 68893e6
-          extents.left   = (int)value->v.cardinal_list.cardinals[0];
Wolfgang Ulbrich 68893e6
-          extents.right  = (int)value->v.cardinal_list.cardinals[1];
Wolfgang Ulbrich 68893e6
-          extents.top    = (int)value->v.cardinal_list.cardinals[2];
Wolfgang Ulbrich 68893e6
-          extents.bottom = (int)value->v.cardinal_list.cardinals[3];
Wolfgang Ulbrich 68893e6
-          meta_window_set_custom_frame_extents (window, &extents);
Wolfgang Ulbrich 68893e6
-        }
Wolfgang Ulbrich 68893e6
-    }
Wolfgang Ulbrich 68893e6
-  else
Wolfgang Ulbrich 68893e6
-    {
Wolfgang Ulbrich 68893e6
-      meta_window_set_custom_frame_extents (window, NULL);
Wolfgang Ulbrich 68893e6
-    }
Wolfgang Ulbrich 68893e6
+  return;
Wolfgang Ulbrich 68893e6
 }
Wolfgang Ulbrich 68893e6
 
Wolfgang Ulbrich 68893e6
 static void