[packages/mate-window-manager] new, version 1.5.2
glen
glen at pld-linux.org
Fri Dec 21 22:30:10 CET 2012
commit ad92460f5ddc914c7662687ae8247b9319983821
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Dec 21 23:29:42 2012 +0200
new, version 1.5.2
based on fedora package
...p-rendering-effect-with-composite-enabled.patch | 25 ++
...eaking-out-from-maximization-during-mouse.patch | 351 +++++++++++++++++++++
initialise_all_workspace_names.patch | 33 ++
mate-window-manager.spec | 140 ++++++++
4 files changed, 549 insertions(+)
---
diff --git a/mate-window-manager.spec b/mate-window-manager.spec
new file mode 100644
index 0000000..ab9b5a3
--- /dev/null
+++ b/mate-window-manager.spec
@@ -0,0 +1,140 @@
+# TODO
+# - subpackages for themes (see metacity.spec)
+# - -libs subpackage
+
+Summary: MATE Desktop window manager
+Name: mate-window-manager
+Version: 1.5.2
+Release: 0.4
+License: LGPLv2+ and GPLv2+
+Group: X11/Window Managers
+URL: http://mate-desktop.org/
+Source0: http://pub.mate-desktop.org/releases/1.5/%{name}-%{version}.tar.xz
+# https://bugzilla.gnome.org/show_bug.cgi?id=622517
+Patch0: Allow-breaking-out-from-maximization-during-mouse.patch
+# https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/583847
+Patch1: initialise_all_workspace_names.patch
+# upstream patch
+# https://github.com/mate-desktop/mate-window-manager/commit/6404a98fb79e7bb4c3e9c5ca9919e12c946679d7
+Patch2: 0001-fix-startup-rendering-effect-with-composite-enabled.patch
+BuildRequires: desktop-file-utils
+BuildRequires: mate-common
+BuildRequires: mate-dialogs
+BuildRequires: pkgconfig(MateCORBA-2.0)
+BuildRequires: pkgconfig(gsettings-desktop-schemas)
+BuildRequires: pkgconfig(gtk+-2.0)
+BuildRequires: pkgconfig(ice)
+BuildRequires: pkgconfig(libcanberra)
+BuildRequires: pkgconfig(libcanberra-gtk)
+BuildRequires: pkgconfig(libsoup-2.4)
+BuildRequires: pkgconfig(libstartup-notification-1.0)
+BuildRequires: pkgconfig(mate-doc-utils)
+BuildRequires: pkgconfig(sm)
+BuildRequires: pkgconfig(xdamage)
+Requires: glib2 >= 1:2.26.0
+Requires: gsettings-desktop-schemas
+Requires(post): /sbin/ldconfig
+Obsoletes: mate-window-manager-libs < 1.4.1-2
+# http://bugzilla.redhat.com/873342
+#Provides: firstboot(windowmanager) = mate-window-manager
+
+#filter_from_requires /^libmarco-private.so/d;
+
+%description
+MATE Desktop window manager
+
+%package devel
+Summary: Development files for mate-window-manager
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Development files for mate-window-manager
+
+%prep
+%setup -q
+%patch0 -p1
+#patch1 -p1
+%patch2 -p1
+NOCONFIGURE=1 ./autogen.sh
+
+%build
+%configure \
+ --disable-static \
+ --disable-scrollkeeper \
+ --with-gnu-ld \
+ --with-gtk=2.0 \
+ --with-x
+
+%{__make} \
+ V=1
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -vf {} ';'
+
+desktop-file-install \
+ --remove-category="MATE" \
+ --delete-original \
+ --dir=$RPM_BUILD_ROOT%{_desktopdir} \
+$RPM_BUILD_ROOT%{_desktopdir}/marco.desktop
+
+%find_lang %{name} --all-name
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/ldconfig
+%glib_compile_schemas
+
+%postun
+/sbin/ldconfig
+%glib_compile_schemas
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%doc AUTHORS COPYING README
+%attr(755,root,root) %{_bindir}/marco
+%attr(755,root,root) %{_bindir}/marco-message
+%{_desktopdir}/marco.desktop
+%{_datadir}/themes/ClearlooksRe
+%{_datadir}/themes/Dopple-Left
+%{_datadir}/themes/Dopple
+%{_datadir}/themes/DustBlue
+%{_datadir}/themes/Spidey-Left
+%{_datadir}/themes/Spidey
+%{_datadir}/themes/Splint-Left
+%{_datadir}/themes/Splint
+%{_datadir}/themes/WinMe
+%{_datadir}/themes/eOS
+%{_datadir}/marco
+%{_datadir}/mate-control-center/keybindings/50-marco*.xml
+%{_datadir}/mate/help/creating-marco-themes/C/creating-marco-themes.xml
+%{_datadir}/mate/wm-properties
+%{_datadir}/glib-2.0/schemas/org.mate.marco.gschema.xml
+%{_mandir}/man1/marco.1.*
+%{_mandir}/man1/marco-message.1.*
+
+# -libs
+%attr(755,root,root) %{_libdir}/libmarco-private.so.*.*.*
+%ghost %{_libdir}/libmarco-private.so.0
+
+# XXX find proper packages
+%dir %{_datadir}/mate-control-center
+%dir %{_datadir}/mate-control-center/keybindings
+%dir %{_datadir}/mate/help/creating-marco-themes
+%dir %{_datadir}/mate/help/creating-marco-themes/C
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/marco-theme-viewer
+%attr(755,root,root) %{_bindir}/marco-window-demo
+%{_includedir}/marco-1
+%{_libdir}/libmarco-private.so
+%{_pkgconfigdir}/libmarco-private.pc
+%{_mandir}/man1/marco-theme-viewer.1.*
+%{_mandir}/man1/marco-window-demo.1.*
diff --git a/0001-fix-startup-rendering-effect-with-composite-enabled.patch b/0001-fix-startup-rendering-effect-with-composite-enabled.patch
new file mode 100644
index 0000000..cfed4d1
--- /dev/null
+++ b/0001-fix-startup-rendering-effect-with-composite-enabled.patch
@@ -0,0 +1,25 @@
+From 6404a98fb79e7bb4c3e9c5ca9919e12c946679d7 Mon Sep 17 00:00:00 2001
+From: Nelson Marques <nmo.marques at gmail.com>
+Date: Sun, 11 Nov 2012 16:58:20 +0000
+Subject: [PATCH] fix startup rendering effect with composite enabled
+
+---
+ src/compositor/compositor-xrender.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
+index 004dfd8..f68d5c4 100644
+--- a/src/compositor/compositor-xrender.c
++++ b/src/compositor/compositor-xrender.c
+@@ -3059,6 +3059,8 @@ meta_compositor_xrender_new (MetaDisplay *display)
+ xrc->atom_net_wm_window_type_toolbar = atoms[12];
+ xrc->atom_net_wm_window_type_dropdown_menu = atoms[13];
+ xrc->atom_net_wm_window_type_tooltip = atoms[14];
++ xrc->show_redraw = FALSE;
++ xrc->debug = FALSE;
+
+ #ifdef USE_IDLE_REPAINT
+ meta_verbose ("Using idle repaint\n");
+--
+1.7.11.7
+
diff --git a/Allow-breaking-out-from-maximization-during-mouse.patch b/Allow-breaking-out-from-maximization-during-mouse.patch
new file mode 100644
index 0000000..379a9eb
--- /dev/null
+++ b/Allow-breaking-out-from-maximization-during-mouse.patch
@@ -0,0 +1,351 @@
+diff -upr marco-1.4.1-orig/src/core/display.c marco-1.4.1/src/core/display.c
+--- marco-1.4.1-orig/src/core/display.c 2012-08-21 21:42:39.000000000 +0200
++++ marco-1.4.1/src/core/display.c 2012-08-25 14:51:42.021447065 +0200
+@@ -3512,6 +3512,7 @@ meta_display_begin_grab_op (MetaDisplay
+ #endif
+ display->grab_was_cancelled = FALSE;
+ display->grab_frame_action = frame_action;
++ display->grab_resize_unmaximize = 0;
+
+ if (display->grab_resize_timeout_id)
+ {
+@@ -3753,11 +3754,20 @@ meta_display_end_grab_op (MetaDisplay *d
+ display->grab_wireframe_rect.x,
+ display->grab_wireframe_rect.y);
+ if (meta_grab_op_is_resizing (display->grab_op))
+- meta_window_resize_with_gravity (display->grab_window,
+- TRUE,
+- display->grab_wireframe_rect.width,
+- display->grab_wireframe_rect.height,
+- meta_resize_gravity_from_grab_op (display->grab_op));
++ {
++ if (display->grab_resize_unmaximize != 0)
++ meta_window_unmaximize_with_gravity (display->grab_window,
++ display->grab_resize_unmaximize,
++ display->grab_wireframe_rect.width,
++ display->grab_wireframe_rect.height,
++ meta_resize_gravity_from_grab_op (display->grab_op));
++ else
++ meta_window_resize_with_gravity (display->grab_window,
++ TRUE,
++ display->grab_wireframe_rect.width,
++ display->grab_wireframe_rect.height,
++ meta_resize_gravity_from_grab_op (display->grab_op));
++ }
+ }
+ meta_window_calc_showing (display->grab_window);
+ }
+diff -upr marco-1.4.1-orig/src/core/display-private.h marco-1.4.1/src/core/display-private.h
+--- marco-1.4.1-orig/src/core/display-private.h 2012-08-21 21:42:39.000000000 +0200
++++ marco-1.4.1/src/core/display-private.h 2012-08-25 14:48:47.159605550 +0200
+@@ -163,6 +163,9 @@ struct _MetaDisplay {
+ guint grab_wireframe_active : 1;
+ guint grab_was_cancelled : 1; /* Only used in wireframe mode */
+ guint grab_frame_action : 1;
++ /* During a resize operation, the directions in which we've broken
++ * out of the initial maximization state */
++ guint grab_resize_unmaximize : 2; /* MetaMaximizeFlags */
+ MetaRectangle grab_wireframe_rect;
+ MetaRectangle grab_wireframe_last_xor_rect;
+ MetaRectangle grab_initial_window_pos;
+diff -upr marco-1.4.1-orig/src/core/window.c marco-1.4.1/src/core/window.c
+--- marco-1.4.1-orig/src/core/window.c 2012-08-21 21:42:39.000000000 +0200
++++ marco-1.4.1/src/core/window.c 2012-08-25 15:11:22.636859026 +0200
+@@ -2666,9 +2666,11 @@ unmaximize_window_before_freeing (MetaWi
+ }
+ }
+
+-void
+-meta_window_unmaximize (MetaWindow *window,
+- MetaMaximizeFlags directions)
++static void
++meta_window_unmaximize_internal (MetaWindow *window,
++ MetaMaximizeFlags directions,
++ MetaRectangle *desired_rect,
++ int gravity)
+ {
+ /* At least one of the two directions ought to be set */
+ gboolean unmaximize_horizontally, unmaximize_vertically;
+@@ -2702,13 +2704,13 @@ meta_window_unmaximize (MetaWindow
+ meta_window_get_client_root_coords (window, &target_rect);
+ if (unmaximize_horizontally)
+ {
+- target_rect.x = window->saved_rect.x;
+- target_rect.width = window->saved_rect.width;
++ target_rect.x = desired_rect->x;
++ target_rect.width = desired_rect->width;
+ }
+ if (unmaximize_vertically)
+ {
+- target_rect.y = window->saved_rect.y;
+- target_rect.height = window->saved_rect.height;
++ target_rect.y = desired_rect->y;
++ target_rect.height = desired_rect->height;
+ }
+
+ /* Window's size hints may have changed while maximized, making
+@@ -2727,12 +2729,13 @@ meta_window_unmaximize (MetaWindow
+ window->display->grab_anchor_window_pos = target_rect;
+ }
+
+- meta_window_move_resize (window,
+- FALSE,
+- target_rect.x,
+- target_rect.y,
+- target_rect.width,
+- target_rect.height);
++ meta_window_move_resize_internal (window,
++ META_IS_MOVE_ACTION | META_IS_RESIZE_ACTION,
++ gravity,
++ target_rect.x,
++ target_rect.y,
++ target_rect.width,
++ target_rect.height);
+
+ /* Make sure user_rect is current.
+ */
+@@ -2749,6 +2752,36 @@ meta_window_unmaximize (MetaWindow
+ }
+
+ void
++meta_window_unmaximize (MetaWindow *window,
++ MetaMaximizeFlags directions)
++{
++ meta_window_unmaximize_internal (window, directions, &window->saved_rect,
++ NorthWestGravity);
++}
++
++/* Like meta_window_unmaximize(), but instead of unmaximizing to the
++ * saved position, we give the new desired size, and the gravity that
++ * determines the positioning relationship between the area occupied
++ * maximized and the new are. The arguments are similar to
++ * meta_window_resize_with_gravity().
++ */
++void
++meta_window_unmaximize_with_gravity (MetaWindow *window,
++ MetaMaximizeFlags directions,
++ int new_width,
++ int new_height,
++ int gravity)
++{
++ MetaRectangle desired_rect;
++
++ meta_window_get_position (window, &desired_rect.x, &desired_rect.y);
++ desired_rect.width = new_width;
++ desired_rect.height = new_height;
++
++ meta_window_unmaximize_internal (window, directions, &desired_rect, gravity);
++}
++
++void
+ meta_window_make_above (MetaWindow *window)
+ {
+ window->wm_state_above = TRUE;
+@@ -7033,6 +7066,112 @@ update_resize_timeout (gpointer data)
+ return FALSE;
+ }
+
++/* When resizing a maximized window by using alt-middle-drag (resizing
++ * with the grips or the menu for a maximized window is not enabled),
++ * the user can "break" out of the maximized state. This checks for
++ * that possibility. During such a break-out resize the user can also
++ * return to the previous maximization state by resizing back to near
++ * the original size.
++ */
++static MetaMaximizeFlags
++check_resize_unmaximize(MetaWindow *window,
++ int dx,
++ int dy)
++{
++ int threshold;
++ MetaMaximizeFlags new_unmaximize;
++
++#define DRAG_THRESHOLD_TO_RESIZE_THRESHOLD_FACTOR 3
++
++ threshold = meta_ui_get_drag_threshold (window->screen->ui) *
++ DRAG_THRESHOLD_TO_RESIZE_THRESHOLD_FACTOR;
++ new_unmaximize = 0;
++
++ if (window->maximized_horizontally ||
++ (window->display->grab_resize_unmaximize & META_MAXIMIZE_HORIZONTAL) != 0)
++ {
++ int x_amount;
++
++ /* We allow breaking out of maximization in either direction, to make
++ * the window larger than the monitor as well as smaller than the
++ * monitor. If we wanted to only allow resizing smaller than the
++ * monitor, we'd use - dx for NE/E/SE and dx for SW/W/NW.
++ */
++ switch (window->display->grab_op)
++ {
++ case META_GRAB_OP_RESIZING_NE:
++ case META_GRAB_OP_KEYBOARD_RESIZING_NE:
++ case META_GRAB_OP_RESIZING_E:
++ case META_GRAB_OP_KEYBOARD_RESIZING_E:
++ case META_GRAB_OP_RESIZING_SE:
++ case META_GRAB_OP_KEYBOARD_RESIZING_SE:
++ case META_GRAB_OP_RESIZING_SW:
++ case META_GRAB_OP_KEYBOARD_RESIZING_SW:
++ case META_GRAB_OP_RESIZING_W:
++ case META_GRAB_OP_KEYBOARD_RESIZING_W:
++ case META_GRAB_OP_RESIZING_NW:
++ case META_GRAB_OP_KEYBOARD_RESIZING_NW:
++ x_amount = dx < 0 ? - dx : dx;
++ break;
++ default:
++ x_amount = 0;
++ break;
++ }
++
++ if (x_amount > threshold)
++ new_unmaximize |= META_MAXIMIZE_HORIZONTAL;
++ }
++
++ if (window->maximized_vertically ||
++ (window->display->grab_resize_unmaximize & META_MAXIMIZE_VERTICAL) != 0)
++ {
++ int y_amount;
++
++ switch (window->display->grab_op)
++ {
++ case META_GRAB_OP_RESIZING_N:
++ case META_GRAB_OP_KEYBOARD_RESIZING_N:
++ case META_GRAB_OP_RESIZING_NE:
++ case META_GRAB_OP_KEYBOARD_RESIZING_NE:
++ case META_GRAB_OP_RESIZING_NW:
++ case META_GRAB_OP_KEYBOARD_RESIZING_NW:
++ case META_GRAB_OP_RESIZING_SE:
++ case META_GRAB_OP_KEYBOARD_RESIZING_SE:
++ case META_GRAB_OP_RESIZING_S:
++ case META_GRAB_OP_KEYBOARD_RESIZING_S:
++ case META_GRAB_OP_RESIZING_SW:
++ case META_GRAB_OP_KEYBOARD_RESIZING_SW:
++ y_amount = dy < 0 ? - dy : dy;
++ break;
++ default:
++ y_amount = 0;
++ break;
++ }
++
++ if (y_amount > threshold)
++ new_unmaximize |= META_MAXIMIZE_VERTICAL;
++ }
++
++ /* Marco doesn't have a full user interface for only horizontally or
++ * vertically maximized, so while only unmaximizing in the direction drags
++ * has some advantages, it will also confuse the user. So, we always
++ * unmaximize both ways if possible.
++ */
++ if (new_unmaximize != 0)
++ {
++ new_unmaximize = 0;
++
++ if (window->maximized_horizontally ||
++ (window->display->grab_resize_unmaximize & META_MAXIMIZE_HORIZONTAL) != 0)
++ new_unmaximize |= META_MAXIMIZE_HORIZONTAL;
++ if (window->maximized_vertically ||
++ (window->display->grab_resize_unmaximize & META_MAXIMIZE_VERTICAL) != 0)
++ new_unmaximize |= META_MAXIMIZE_VERTICAL;
++ }
++
++ return new_unmaximize;
++}
++
+ static void
+ update_resize (MetaWindow *window,
+ gboolean snap,
+@@ -7045,6 +7184,7 @@ update_resize (MetaWindow *window,
+ MetaRectangle old;
+ int new_x, new_y;
+ double remaining;
++ MetaMaximizeFlags new_unmaximize;
+
+ window->display->grab_latest_motion_x = x;
+ window->display->grab_latest_motion_y = y;
+@@ -7233,6 +7373,8 @@ update_resize (MetaWindow *window,
+
+ if (window->display->grab_wireframe_active)
+ {
++ MetaRectangle root_coords;
++
+ if ((new_x + new_w <= new_x) || (new_y + new_h <= new_y))
+ return;
+
+@@ -7242,16 +7384,56 @@ update_resize (MetaWindow *window,
+ * wireframe, but still resize it; however, that probably
+ * confuses broken clients that have problems with opaque
+ * resize, they probably don't track their visibility.
++ *
++ * We handle the basic constraints on maximized windows here
++ * to give the user feedback.
+ */
++
++ if (window->maximized_horizontally && (new_unmaximize & META_MAXIMIZE_HORIZONTAL) == 0)
++ {
++ meta_window_get_client_root_coords (window, &root_coords);
++ new_x = root_coords.x;
++ new_w = root_coords.width;
++ }
++ if (window->maximized_vertically && (new_unmaximize & META_MAXIMIZE_VERTICAL) == 0)
++ {
++ meta_window_get_client_root_coords (window, &root_coords);
++ new_y = root_coords.y;
++ new_h = root_coords.height;
++ }
++
+ meta_window_update_wireframe (window, new_x, new_y, new_w, new_h);
+ }
+ else
+ {
+- /* We don't need to update unless the specified width and height
+- * are actually different from what we had before.
+- */
+- if (old.width != new_w || old.height != new_h)
+- meta_window_resize_with_gravity (window, TRUE, new_w, new_h, gravity);
++ if (new_unmaximize == window->display->grab_resize_unmaximize)
++ {
++ /* We don't need to update unless the specified width and height
++ * are actually different from what we had before.
++ */
++ if (old.width != new_w || old.height != new_h)
++ {
++ if ((window->display->grab_resize_unmaximize == new_unmaximize))
++ meta_window_resize_with_gravity (window, TRUE, new_w, new_h, gravity);
++ }
++ }
++ else
++ {
++ if ((new_unmaximize & ~window->display->grab_resize_unmaximize) != 0)
++ {
++ meta_window_unmaximize_with_gravity (window,
++ (new_unmaximize & ~window->display->grab_resize_unmaximize),
++ new_w, new_h, gravity);
++ }
++
++ if ((window->display->grab_resize_unmaximize & ~new_unmaximize))
++ {
++ MetaRectangle saved_rect = window->saved_rect;
++ meta_window_maximize (window,
++ (window->display->grab_resize_unmaximize & ~new_unmaximize));
++ window->saved_rect = saved_rect;
++ }
++ }
+ }
+
+ /* Store the latest resize time, if we actually resized. */
+diff -upr marco-1.4.1-orig/src/core/window-private.h marco-1.4.1/src/core/window-private.h
+--- marco-1.4.1-orig/src/core/window-private.h 2012-08-21 21:42:39.000000000 +0200
++++ marco-1.4.1/src/core/window-private.h 2012-08-25 14:53:44.522736630 +0200
+@@ -412,6 +412,12 @@ void meta_window_maximize_interna
+ MetaRectangle *saved_rect);
+ void meta_window_unmaximize (MetaWindow *window,
+ MetaMaximizeFlags directions);
++void meta_window_unmaximize_with_gravity (MetaWindow *window,
++ MetaMaximizeFlags directions,
++ int new_width,
++ int new_height,
++ int gravity);
++void meta_window_make_above (MetaWindow *window);
+ void meta_window_make_above (MetaWindow *window);
+ void meta_window_unmake_above (MetaWindow *window);
+ void meta_window_shade (MetaWindow *window,
diff --git a/initialise_all_workspace_names.patch b/initialise_all_workspace_names.patch
new file mode 100644
index 0000000..11823a2
--- /dev/null
+++ b/initialise_all_workspace_names.patch
@@ -0,0 +1,33 @@
+--- a/src/core/prefs.c
++++ b/src/core/prefs.c
+@@ -1962,6 +1962,10 @@ init_commands (void)
+ static void
+ init_workspace_names (void)
+ {
++ int i;
++ for (i = 0; i < MAX_REASONABLE_WORKSPACES; i++)
++ workspace_names[i] = NULL;
++
+ #ifdef HAVE_MATECONF
+ GSList *list, *l;
+ const char *str_val;
+@@ -1980,14 +1984,15 @@ init_workspace_names (void)
+ mateconf_entry_free (entry);
+ }
+ g_slist_free (list);
+-#else
+- int i;
++#endif /* HAVE_MATECONF */
++
++ /* initialise any we didn't see */
+ for (i = 0; i < MAX_REASONABLE_WORKSPACES; i++)
+- workspace_names[i] = g_strdup_printf (_("Workspace %d"), i + 1);
++ if (workspace_names[i]==NULL)
++ workspace_names[i] = g_strdup_printf (_("Workspace %d"), i + 1);
+
+ meta_topic (META_DEBUG_PREFS,
+ "Initialized workspace names\n");
+-#endif /* HAVE_MATECONF */
+ }
+
+ static gboolean
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mate-window-manager.git/commitdiff/ad92460f5ddc914c7662687ae8247b9319983821
More information about the pld-cvs-commit
mailing list