diff --git a/libwnck-2.12.2-window-move-1.patch b/libwnck-2.12.2-window-move-1.patch deleted file mode 100644 index fe20194..0000000 --- a/libwnck-2.12.2-window-move-1.patch +++ /dev/null @@ -1,92 +0,0 @@ ---- libwnck/window.c -+++ libwnck/window.c -@@ -1165,6 +1165,20 @@ - window->priv->xwindow); - } - -+void -+wnck_window_move (WnckWindow *window, int x, int y) -+{ -+ g_return_if_fail (WNCK_IS_WINDOW (window)); -+ -+ _wnck_move_resize (WNCK_SCREEN_XSCREEN (window->priv->screen), -+ window->priv->xwindow, -+ TRUE, -+ FALSE, -+ x, y, -+ 0, 0); -+} -+ -+ - /** - * wnck_window_get_workspace: - * @window: a #WnckWindow ---- libwnck/window.h -+++ libwnck/window.h -@@ -217,6 +217,7 @@ - void wnck_window_unstick (WnckWindow *window); - void wnck_window_keyboard_move (WnckWindow *window); - void wnck_window_keyboard_size (WnckWindow *window); -+void wnck_window_move (WnckWindow *window, int x, int y); - - WnckWorkspace* wnck_window_get_workspace (WnckWindow *window); - void wnck_window_move_to_workspace (WnckWindow *window, ---- libwnck/xutils.c -+++ libwnck/xutils.c -@@ -919,6 +919,38 @@ - } - - void -+_wnck_move_resize (Screen *screen, -+ Window xwindow, -+ gboolean move, -+ gboolean resize, -+ int x, -+ int y, -+ unsigned int width, -+ unsigned int height) -+{ -+ XEvent xev; -+ -+ xev.xclient.type = ClientMessage; -+ xev.xclient.serial = 0; -+ xev.xclient.send_event = True; -+ xev.xclient.display = gdk_display; -+ xev.xclient.window = xwindow; -+ xev.xclient.message_type = _wnck_atom_get ("_NET_MOVERESIZE_WINDOW"); -+ xev.xclient.format = 32; -+ xev.xclient.data.l[0] = ((move) ? 3 << 7 : 0) | ((resize) ? 3 << 9 : 0); -+ xev.xclient.data.l[1] = x; -+ xev.xclient.data.l[2] = y; -+ xev.xclient.data.l[3] = width; -+ xev.xclient.data.l[4] = height; -+ -+ XSendEvent (gdk_display, -+ RootWindowOfScreen (screen), -+ False, -+ SubstructureRedirectMask | SubstructureNotifyMask, -+ &xev); -+} -+ -+void - _wnck_change_state (Screen *screen, - Window xwindow, - gboolean add, ---- libwnck/xutils.h -+++ libwnck/xutils.h -@@ -126,6 +126,15 @@ - void _wnck_keyboard_size (Screen *screen, - Window xwindow); - -+void _wnck_move_resize (Screen *screen, -+ Window xwindow, -+ gboolean move, -+ gboolean resize, -+ int x, -+ int y, -+ unsigned int width, -+ unsigned int height); -+ - void _wnck_toggle_showing_desktop (Screen *screen, - gboolean show); - diff --git a/libwnck-border_width-fix-2.patch b/libwnck-border_width-fix-2.patch deleted file mode 100644 index 288ab67..0000000 --- a/libwnck-border_width-fix-2.patch +++ /dev/null @@ -1,33 +0,0 @@ -Index: libwnck/window.c -=================================================================== ---- libwnck/window.c.orig -+++ libwnck/window.c -@@ -2629,8 +2629,10 @@ _wnck_window_process_configure_notify (W - &window->priv->y); - } - -- window->priv->width = xevent->xconfigure.width; -- window->priv->height = xevent->xconfigure.height; -+ window->priv->width = xevent->xconfigure.width + -+ xevent->xconfigure.border_width * 2; -+ window->priv->height = xevent->xconfigure.height + -+ xevent->xconfigure.border_width * 2; - - emit_geometry_changed (window); - } -Index: libwnck/xutils.c -=================================================================== ---- libwnck/xutils.c.orig -+++ libwnck/xutils.c -@@ -2384,9 +2384,9 @@ _wnck_get_window_geometry (Screen *scree - _wnck_get_window_position (screen, xwindow, xp, yp); - - if (widthp) -- *widthp = width; -+ *widthp = width + bw * 2; - if (heightp) -- *heightp = height; -+ *heightp = height + bw * 2; - } - - void _wnck_set_window_geometry (Screen *screen, diff --git a/libwnck-opacity-2.patch b/libwnck-opacity-2.patch deleted file mode 100644 index 463c7f4..0000000 --- a/libwnck-opacity-2.patch +++ /dev/null @@ -1,321 +0,0 @@ -Index: libwnck/window-action-menu.c -=================================================================== ---- libwnck/window-action-menu.c.orig -+++ libwnck/window-action-menu.c -@@ -49,6 +49,7 @@ typedef enum - ABOVE, - MOVE, - RESIZE, -+ CHANGE_OPACITY, - PIN, - UNPIN, - LEFT, -@@ -69,6 +70,7 @@ struct _ActionMenuData - GtkWidget *above_item; - GtkWidget *move_item; - GtkWidget *resize_item; -+ GtkWidget *opacity_item; - GtkWidget *close_item; - GtkWidget *workspace_separator; - GtkWidget *pin_item; -@@ -181,6 +183,15 @@ item_activated_callback (GtkWidget *menu - case RESIZE: - wnck_window_keyboard_size (amd->window); - break; -+ case CHANGE_OPACITY: { -+ int opacity_value; -+ -+ opacity_value = -+ GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menu_item), -+ "opacity")); -+ -+ wnck_window_set_opacity (amd->window, opacity_value); -+ } break; - case PIN: - if (!viewport_mode) - wnck_window_pin (amd->window); -@@ -1059,6 +1070,47 @@ wnck_create_window_action_menu (WnckWind - gtk_menu_shell_append (GTK_MENU_SHELL (menu), - amd->workspace_item); - -+ if (wnck_screen_net_wm_supports (wnck_window_get_screen (amd->window), -+ "_NET_WM_WINDOW_OPACITY")) -+ { -+ guint present_opacity; -+ gint j; -+ -+ amd->opacity_item = gtk_menu_item_new_with_mnemonic (_("_Opacity")); -+ gtk_widget_show (amd->opacity_item); -+ -+ submenu = gtk_menu_new (); -+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (amd->opacity_item), -+ submenu); -+ -+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), amd->opacity_item); -+ -+ present_opacity = wnck_window_get_opacity (window); -+ for (j = 0; j < 4; j++) -+ { -+ GtkWidget *item; -+ gchar *label; -+ guint o; -+ -+ label = g_strdup_printf ("%d%%", (j + 1) * 25); -+ -+ item = make_menu_item (amd, CHANGE_OPACITY); -+ -+ o = (j + 1) * 25; -+ g_object_set_data (G_OBJECT (item), "opacity", GINT_TO_POINTER (o)); -+ -+ if (o == present_opacity) -+ gtk_widget_set_sensitive (item, FALSE); -+ -+ gtk_menu_shell_append (GTK_MENU_SHELL (submenu), item); -+ -+ set_item_text (item, label); -+ set_item_stock (item, NULL); -+ -+ g_free (label); -+ } -+ } -+ - separator = gtk_separator_menu_item_new (); - gtk_widget_show (separator); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), -Index: libwnck/window.c -=================================================================== ---- libwnck/window.c.orig -+++ libwnck/window.c -@@ -110,6 +110,8 @@ struct _WnckWindowPrivate - - char *res_class; - char *res_name; -+ -+ guint32 opacity; - - /* true if transient_for points to root window, - * not another app window -@@ -157,6 +159,7 @@ struct _WnckWindowPrivate - guint need_update_startup_id : 1; - guint need_update_wmclass : 1; - guint need_update_wmhints : 1; -+ guint need_update_opacity : 1; - guint need_update_frame_extents : 1; - - guint need_emit_name_changed : 1; -@@ -173,6 +176,7 @@ enum { - ICON_CHANGED, - ACTIONS_CHANGED, - GEOMETRY_CHANGED, -+ OPACITY_CHANGED, - LAST_SIGNAL - }; - -@@ -201,6 +205,7 @@ static void update_wintype (WnckWindow - static void update_transient_for (WnckWindow *window); - static void update_startup_id (WnckWindow *window); - static void update_wmclass (WnckWindow *window); -+static void update_opacity (WnckWindow *window); - static void update_frame_extents (WnckWindow *window); - static void unqueue_update (WnckWindow *window); - static void queue_update (WnckWindow *window); -@@ -407,6 +412,15 @@ wnck_window_class_init (WnckWindowClass - NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, 0); -+ -+ signals[OPACITY_CHANGED] = -+ g_signal_new ("opacity_changed", -+ G_OBJECT_CLASS_TYPE (object_class), -+ G_SIGNAL_RUN_LAST, -+ G_STRUCT_OFFSET (WnckWindowClass, opacity_changed), -+ NULL, NULL, -+ g_cclosure_marshal_VOID__VOID, -+ G_TYPE_NONE, 0); - } - - static void -@@ -556,6 +570,7 @@ _wnck_window_create (Window xwindow - window->priv->need_update_startup_id = TRUE; - window->priv->need_update_wmclass = TRUE; - window->priv->need_update_wmhints = TRUE; -+ window->priv->need_update_opacity = TRUE; - window->priv->need_update_frame_extents = TRUE; - window->priv->need_emit_name_changed = FALSE; - window->priv->need_emit_icon_changed = FALSE; -@@ -2320,6 +2335,29 @@ wnck_window_set_geometry (WnckWindow - gravity_and_flags, x, y, width, height); - } - -+guint -+wnck_window_get_opacity (WnckWindow *window) -+{ -+ guint64 o; -+ -+ g_return_val_if_fail (WNCK_IS_WINDOW (window), 0); -+ -+ o = ((guint64) window->priv->opacity * 1005) / G_MAXUINT32; -+ -+ return o / 10; -+} -+ -+void -+wnck_window_set_opacity (WnckWindow *window, -+ guint opacity) -+{ -+ g_return_if_fail (WNCK_IS_WINDOW (window)); -+ -+ _wnck_change_opacity (WNCK_SCREEN_XSCREEN (window->priv->screen), -+ wnck_window_get_xid (window), -+ (((guint64) opacity * G_MAXUINT32) / 100)); -+} -+ - /** - * wnck_window_is_visible_on_workspace: - * @window: a #WnckWindow. -@@ -2565,6 +2603,13 @@ _wnck_window_process_property_notify (Wn - window->priv->need_update_frame_extents = TRUE; - queue_update (window); - } -+ else if (xevent->xproperty.atom == -+ _wnck_atom_get ("_NET_WM_WINDOW_OPACITY")) -+ { -+ window->priv->need_update_opacity = TRUE; -+ queue_update (window); -+ } -+ - } - - void -@@ -3138,6 +3183,17 @@ update_frame_extents (WnckWindow *window - } - - static void -+update_opacity (WnckWindow *window) -+{ -+ if (!window->priv->need_update_opacity) -+ return; -+ -+ window->priv->need_update_opacity = FALSE; -+ -+ window->priv->opacity = _wnck_get_opacity (window->priv->xwindow); -+} -+ -+static void - force_update_now (WnckWindow *window) - { - WnckWindowState old_state; -@@ -3172,6 +3228,7 @@ force_update_now (WnckWindow *window) - */ - update_workspace (window); /* emits signals */ - update_actions (window); -+ update_opacity (window); - update_frame_extents (window); /* emits signals */ - - get_icons (window); -Index: libwnck/window.h -=================================================================== ---- libwnck/window.h.orig -+++ libwnck/window.h -@@ -272,6 +272,9 @@ struct _WnckWindowClass - /* Changed size/position */ - void (* geometry_changed) (WnckWindow *window); - -+ /* Changed opacity */ -+ void (* opacity_changed) (WnckWindow *window); -+ - /* Padding for future expansion */ - void (* pad1) (void); - void (* pad2) (void); -@@ -401,6 +404,9 @@ void wnck_window_set_geometry (WnckWindo - int width, - int height); - -+guint wnck_window_get_opacity (WnckWindow *window); -+void wnck_window_set_opacity (WnckWindow *window, guint opacity); -+ - gboolean wnck_window_is_visible_on_workspace (WnckWindow *window, - WnckWorkspace *workspace); - gboolean wnck_window_is_on_workspace (WnckWindow *window, -Index: libwnck/xutils.c -=================================================================== ---- libwnck/xutils.c.orig -+++ libwnck/xutils.c -@@ -1143,6 +1143,33 @@ _wnck_toggle_showing_desktop (Screen *s - _wnck_error_trap_pop (); - } - -+void -+_wnck_change_opacity (Screen *screen, -+ Window xwindow, -+ guint32 opacity) -+{ -+ XEvent xev; -+ -+ xev.xclient.type = ClientMessage; -+ xev.xclient.serial = 0; -+ xev.xclient.send_event = True; -+ xev.xclient.display = gdk_display; -+ xev.xclient.window = xwindow; -+ xev.xclient.message_type = _wnck_atom_get ("_NET_WM_WINDOW_OPACITY"); -+ xev.xclient.format = 32; -+ xev.xclient.data.l[0] = opacity; -+ xev.xclient.data.l[1] = 0; -+ xev.xclient.data.l[2] = 0; -+ xev.xclient.data.l[3] = 0; -+ xev.xclient.data.l[4] = 0; -+ -+ XSendEvent (gdk_display, -+ RootWindowOfScreen (screen), -+ False, -+ SubstructureRedirectMask | SubstructureNotifyMask, -+ &xev); -+} -+ - char* - _wnck_get_session_id (Window xwindow) - { -@@ -1317,6 +1344,19 @@ _wnck_get_frame_extents (Window xwindow - return retval; - } - -+guint32 -+_wnck_get_opacity (Window xwindow) -+{ -+ int val; -+ -+ if (_wnck_get_cardinal (xwindow, -+ _wnck_atom_get ("_NET_WM_WINDOW_OPACITY"), -+ &val)) -+ return val; -+ -+ return G_MAXUINT32; -+} -+ - void - _wnck_select_input (Window xwindow, - int mask) -Index: libwnck/xutils.h -=================================================================== ---- libwnck/xutils.h.orig -+++ libwnck/xutils.h -@@ -110,6 +110,9 @@ void _wnck_activate_workspace (Screen *s - void _wnck_change_viewport (Screen *screen, - int x, - int y); -+void _wnck_change_opacity (Screen *screen, -+ Window xwindow, -+ guint32 opacity); - - char* _wnck_get_session_id (Window xwindow); - int _wnck_get_pid (Window xwindow); -@@ -125,6 +128,9 @@ gboolean _wnck_get_frame_extents (Windo - int *top_frame, - int *bottom_frame); - -+guint32 _wnck_get_opacity (Window xwindow); -+ -+ - void _wnck_select_input (Window xwindow, - int mask); - diff --git a/libwnck-realistic-layout.patch b/libwnck-realistic-layout.patch deleted file mode 100644 index ca586c1..0000000 --- a/libwnck-realistic-layout.patch +++ /dev/null @@ -1,57 +0,0 @@ -This fixes a problem of overaggressively grouping windows in the -tasklist with our default size 24 panel. See bnc #148840 for -details and a screenshot. - -Index: libwnck/tasklist.c -=================================================================== ---- libwnck/tasklist.c.orig -+++ libwnck/tasklist.c -@@ -216,6 +216,9 @@ struct _WnckTasklistPrivate - int *size_hints; - int size_hints_len; - -+ gint last_width; -+ gint last_height; -+ - WnckLoadIconFunction icon_loader; - void *icon_loader_data; - GDestroyNotify free_icon_loader_data; -@@ -692,6 +695,9 @@ wnck_tasklist_init (WnckTasklist *taskli - for (i = 0; i < N_SCREEN_CONNECTIONS; i++) - tasklist->priv->screen_connections[i] = 0; - -+ tasklist->priv->last_width = -1; -+ tasklist->priv->last_height = -1; -+ - tasklist->priv->idle_callback_tag = 0; - - tasklist->priv->size_hints = NULL; -@@ -1324,8 +1330,16 @@ wnck_tasklist_size_request (GtkWidget - tasklist->priv->max_button_width = wnck_tasklist_get_button_size (widget); - tasklist->priv->max_button_height = max_height; - -- fake_allocation.width = GTK_WIDGET (tasklist)->allocation.width; -- fake_allocation.height = GTK_WIDGET (tasklist)->allocation.height; -+ /* fake_allocation.width = GTK_WIDGET (tasklist)->allocation.width; -+ fake_allocation.height = GTK_WIDGET (tasklist)->allocation.height; */ -+ if (tasklist->priv->last_width != -1) -+ fake_allocation.width = tasklist->priv->last_width; -+ else -+ fake_allocation.width = GTK_WIDGET (tasklist)->allocation.width; -+ if (tasklist->priv->last_height != -1) -+ fake_allocation.height = tasklist->priv->last_height; -+ else -+ fake_allocation.height = GTK_WIDGET (tasklist)->allocation.height; - - array = g_array_new (FALSE, FALSE, sizeof (int)); - -@@ -1501,6 +1515,9 @@ wnck_tasklist_size_allocate (GtkWidget - - tasklist = WNCK_TASKLIST (widget); - -+ tasklist->priv->last_width = allocation->width; -+ tasklist->priv->last_height = allocation->height; -+ - n_windows = g_list_length (tasklist->priv->windows); - n_startup_sequences = g_list_length (tasklist->priv->startup_sequences); - n_grouped_buttons = 0; diff --git a/libwnck.changes b/libwnck.changes index 14fe34c..c52d972 100644 --- a/libwnck.changes +++ b/libwnck.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Mon Mar 17 23:11:07 CET 2008 - vuntz@suse.de + +- After a discussion with David Raveman, we agree that the last + three patches (libwnck-2.12.2-window-move-1.patch, + libwnck-opacity-2.patch, libwnck-border_width-fix-2.patch) are + not needed for compiz any more, so killing them. + +------------------------------------------------------------------- +Mon Mar 17 12:06:03 CET 2008 - vuntz@suse.de + +- Remove libwnck-realistic-layout.patch. + Was fixed upstream in June 2007, see bgo#339861. + ------------------------------------------------------------------- Fri Mar 14 03:56:34 CET 2008 - maw@suse.de diff --git a/libwnck.spec b/libwnck.spec index 23148fc..73be972 100644 --- a/libwnck.spec +++ b/libwnck.spec @@ -16,18 +16,13 @@ BuildRequires: fdupes gnome-common gtk-doc gtk2-devel intltool licenses perl-XM License: LGPL v2.1 or later Group: Development/Libraries/GNOME Version: 2.22.0 -Release: 1 +Release: 3 # WARNING: After changing versions please call Re or rpmbuild to auto-update spec file: #%(sh %{_sourcedir}/%{name}_spec-update.sh %{_sourcedir} %{name} libwnck-1) %define libwnck-1_name 22 Summary: Window Navigator Construction Kit (Library Package) Source: %{name}-%{version}.tar.bz2 Source1: %{name}_spec-update.sh -Patch4: libwnck-2.12.2-window-move-1.patch -Patch8: libwnck-realistic-layout.patch -# PATCH-NEEDS-REBASE libwnck-opacity-2.patch -Patch9: libwnck-opacity-2.patch -Patch11: libwnck-border_width-fix-2.patch Requires: libwnck-1-22 = %{version} licenses Requires: %{name}-lang = %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -91,10 +86,6 @@ Authors: %lang_package %prep %setup -q -%patch4 -%patch8 -#%patch9 -%patch11 # rpmlint note: libwnck has a separate translation for both Bengali and Bengali India %build @@ -151,6 +142,14 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/gtk-doc/html/* %changelog +* Tue Mar 18 2008 vuntz@suse.de +- After a discussion with David Raveman, we agree that the last + three patches (libwnck-2.12.2-window-move-1.patch, + libwnck-opacity-2.patch, libwnck-border_width-fix-2.patch) are + not needed for compiz any more, so killing them. +* Mon Mar 17 2008 vuntz@suse.de +- Remove libwnck-realistic-layout.patch. + Was fixed upstream in June 2007, see bgo#339861. * Fri Mar 14 2008 maw@suse.de - Update to version 2.22.0: + Fix wnck_window_set_geometry() to work as intended, ie