From 75a31dab93cb35135af61428a4c739b47e2b782b Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Oct 23 2015 18:31:48 +0000 Subject: several bugfixes --- diff --git a/marco.spec b/marco.spec index c80fcb0..7d20ba1 100644 --- a/marco.spec +++ b/marco.spec @@ -15,7 +15,7 @@ Name: marco Version: %{branch}.2 %if 0%{?rel_build} -Release: 1%{?dist} +Release: 2%{?dist} %else Release: 0.2%{?git_rel}%{?dist} %endif @@ -38,6 +38,11 @@ Source5: window.png # needed for fixing initial-setup issue, rhbz (#962009) Patch0: marco_add-pixbuf-inline-icons_1.9.x.patch +# https://github.com/mate-desktop/marco/pull/229 +# https://bugzilla.redhat.com/show_bug.cgi?id=1258638 +Patch1: marco_effects-remove-hack.patch +# fix https://bugzilla.redhat.com/show_bug.cgi?id=1258131 +Patch2: marco_revert-GTK_FRAME_EXTENTS-commits-on-master.patch Requires: mate-desktop-libs @@ -93,6 +98,8 @@ cp %{SOURCE4} src/stock_minimize.png cp %{SOURCE5} src/window.png %patch0 -p1 -b .inline-icons +%patch1 -p1 -b .remove-hack +%patch2 -p1 -b .revert-GTK_FRAME_EXTENTS # needed for the patch and for git snapshot builds autoreconf -if @@ -172,6 +179,10 @@ fi %changelog +* Fri Oct 23 2015 Wolfgang Ulbrich - 1.10.2-2 +- fix rhbz (#1258638) +- fix rhbz (#1258131), revert support for GTK_FRAME_EXTENTS for the moment + * Thu Aug 20 2015 Wolfgang Ulbrich - 1.10.2.1 - update to 1.10.2 release - remove upstreamed patches diff --git a/marco_effects-remove-hack.patch b/marco_effects-remove-hack.patch new file mode 100644 index 0000000..0769780 --- /dev/null +++ b/marco_effects-remove-hack.patch @@ -0,0 +1,47 @@ +diff --git a/src/core/effects.c b/src/core/effects.c +index 469184e..163ec05 100644 +--- a/src/core/effects.c ++++ b/src/core/effects.c +@@ -316,23 +316,6 @@ update_wireframe_window (MetaDisplay *display, + } + #endif + +-/** +- * A hack to force the X server to synchronize with the +- * graphics hardware. +- */ +-static void +-graphics_sync (BoxAnimationContext *context) +-{ +- XImage *image; +- +- image = XGetImage (context->screen->display->xdisplay, +- context->screen->xroot, +- 0, 0, 1, 1, +- AllPlanes, ZPixmap); +- +- XDestroyImage (image); +-} +- + static gboolean + effects_draw_box_animation_timeout (BoxAnimationContext *context) + { +@@ -383,8 +366,6 @@ effects_draw_box_animation_timeout (BoxAnimationContext *context) + context->gc); + #endif /* !HAVE_SHAPE */ + +- graphics_sync (context); +- + context->finished(context->finished_data); + + g_free (context); +@@ -425,7 +406,7 @@ effects_draw_box_animation_timeout (BoxAnimationContext *context) + #endif /* !HAVE_SHAPE */ + + /* kick changes onto the server */ +- graphics_sync (context); ++ XFlush (context->screen->display->xdisplay); + + return TRUE; + } + diff --git a/marco_revert-GTK_FRAME_EXTENTS-commits.patch b/marco_revert-GTK_FRAME_EXTENTS-commits.patch new file mode 100644 index 0000000..325b4ce --- /dev/null +++ b/marco_revert-GTK_FRAME_EXTENTS-commits.patch @@ -0,0 +1,168 @@ +diff -upr marco/src/core/atomnames.h marco-test-master/src/core/atomnames.h +--- marco/src/core/atomnames.h 2015-10-06 17:15:54.909757371 +0200 ++++ marco-test-master/src/core/atomnames.h 2015-10-23 17:19:23.373005831 +0200 +@@ -58,7 +58,6 @@ item(_MARCO_RESTART_MESSAGE) + item(_MARCO_RELOAD_THEME_MESSAGE) + item(_MARCO_SET_KEYBINDINGS_MESSAGE) + item(_MARCO_TOGGLE_VERBOSE) +-item(_GTK_FRAME_EXTENTS) + item(_MATE_PANEL_ACTION) + item(_MATE_PANEL_ACTION_MAIN_MENU) + item(_MATE_PANEL_ACTION_RUN_DIALOG) +@@ -71,6 +70,7 @@ item(MULTIPLE) + item(TIMESTAMP) + item(VERSION) + item(ATOM_PAIR) ++item(_GTK_FRAME_EXTENTS) + + /* Oddities: These are used, and we need atoms for them, + * but when we need all _NET_WM hints (i.e. when we're making +diff -upr marco/src/core/constraints.c marco-test-master/src/core/constraints.c +--- marco/src/core/constraints.c 2015-10-06 17:15:54.910757381 +0200 ++++ marco-test-master/src/core/constraints.c 2015-10-23 17:20:37.214737879 +0200 +@@ -437,7 +437,7 @@ setup_constraint_info (ConstraintInfo + */ + + if (meta_prefs_get_force_fullscreen() && +- (window->decorated || !meta_window_is_client_decorated (window)) && ++ window->decorated && + meta_rectangle_equal (new, &xinerama_info->rect) && + window->has_fullscreen_func && + !window->fullscreen) +diff -upr marco/src/core/window.c marco-test-master/src/core/window.c +--- marco/src/core/window.c 2015-10-23 17:18:23.157406594 +0200 ++++ marco-test-master/src/core/window.c 2015-10-23 17:20:41.317778555 +0200 +@@ -4058,18 +4058,7 @@ meta_window_get_outer_rect (const MetaWi + if (window->frame) + *rect = window->frame->rect; + else +- { +- *rect = window->rect; +- +- if (window->has_custom_frame_extents) +- { +- const GtkBorder *extents = &window->custom_frame_extents; +- rect->x += extents->left; +- rect->y += extents->top; +- rect->width -= extents->left + extents->right; +- rect->height -= extents->top + extents->bottom; +- } +- } ++ *rect = window->rect; + } + + void +@@ -8468,20 +8457,3 @@ meta_window_is_maximized (MetaWindow *wi + return META_WINDOW_MAXIMIZED (window); + } + +-/** +- * meta_window_is_client_decorated: +- * +- * Check if if the window has decorations drawn by the client. +- * (window->decorated refers only to whether we should add decorations) +- */ +-gboolean +-meta_window_is_client_decorated (MetaWindow *window) +-{ +- /* Currently the implementation here is hackish - +- * has_custom_frame_extents() is set if _GTK_FRAME_EXTENTS is set +- * to any value even 0. GTK+ always sets _GTK_FRAME_EXTENTS for +- * client-side-decorated window, even if the value is 0 because +- * the window is maxized and has no invisible borders or shadows. +- */ +- return window->has_custom_frame_extents; +-} +diff -upr marco/src/core/window-private.h marco-test-master/src/core/window-private.h +--- marco/src/core/window-private.h 2015-10-23 17:18:23.155406574 +0200 ++++ marco-test-master/src/core/window-private.h 2015-10-23 17:20:41.320778585 +0200 +@@ -356,9 +356,6 @@ struct _MetaWindow + */ + MetaRectangle rect; + +- gboolean has_custom_frame_extents; +- GtkBorder custom_frame_extents; +- + /* The geometry to restore when we unmaximize. The position is in + * root window coords, even if there's a frame, which contrasts with + * window->rect above. Note that this gives the position and size +@@ -664,8 +661,6 @@ void meta_window_unset_demands_attention + + void meta_window_update_icon_now (MetaWindow *window); + +-gboolean meta_window_is_client_decorated (MetaWindow *window); +- + void meta_window_update_role (MetaWindow *window); + void meta_window_update_net_wm_type (MetaWindow *window); + +diff -upr marco/src/core/window-props.c marco-test-master/src/core/window-props.c +--- marco/src/core/window-props.c 2015-10-06 17:15:54.919757469 +0200 ++++ marco-test-master/src/core/window-props.c 2015-10-23 17:20:35.921725060 +0200 +@@ -215,66 +215,12 @@ reload_kwm_win_icon (MetaWindow *wind + reload_icon (window, window->display->atom__KWM_WIN_ICON); + } + +-static gboolean +-gtk_border_equal (GtkBorder *a, +- GtkBorder *b) +-{ +- return (a->left == b->left && +- a->right == b->right && +- a->top == b->top && +- a->bottom == b->bottom); +-} +- +-static void +-meta_window_set_custom_frame_extents (MetaWindow *window, +- GtkBorder *extents) +-{ +- if (extents) +- { +- if (window->has_custom_frame_extents && gtk_border_equal (&window->custom_frame_extents, extents)) +- return; +- +- window->has_custom_frame_extents = TRUE; +- window->custom_frame_extents = *extents; +- } +- else +- { +- if (!window->has_custom_frame_extents) +- return; +- +- window->has_custom_frame_extents = FALSE; +- memset (&window->custom_frame_extents, 0, sizeof (window->custom_frame_extents)); +- } +- +- meta_window_queue (window, META_QUEUE_MOVE_RESIZE); +-} +- + static void + reload_gtk_frame_extents (MetaWindow *window, + MetaPropValue *value, + gboolean initial) + { +- if (value->type != META_PROP_VALUE_INVALID) +- { +- if (value->v.cardinal_list.n_cardinals != 4) +- { +- meta_verbose ("_GTK_FRAME_EXTENTS on %s has %d values instead of 4\n", +- window->desc, value->v.cardinal_list.n_cardinals); +- } +- else +- { +- GtkBorder extents; +- extents.left = (int)value->v.cardinal_list.cardinals[0]; +- extents.right = (int)value->v.cardinal_list.cardinals[1]; +- extents.top = (int)value->v.cardinal_list.cardinals[2]; +- extents.bottom = (int)value->v.cardinal_list.cardinals[3]; +- meta_window_set_custom_frame_extents (window, &extents); +- } +- } +- else +- { +- meta_window_set_custom_frame_extents (window, NULL); +- } ++ return; + } + + static void