wok-stable annotate superswitcher/stuff/superswitcher-0.6-wnck-workspace.patch @ rev 11727

Move from undigest: python-antlr python-caldav python-gdata python-vatnumber python-vobject python-webdav python-xlwt python-zsi
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 21 09:18:42 2012 +0100 (2012-02-21)
parents
children
rev   line source
gokhlayeh@8783 1 It seems like wnck_window_is_skip_pager isn't all we need to check.
gokhlayeh@8783 2
gokhlayeh@8783 3 --- superswitcher/src/screen.c
gokhlayeh@8783 4 +++ superswitcher/src/screen.c
gokhlayeh@8783 5 @@ -505,6 +505,7 @@
gokhlayeh@8783 6 static SSWindow *
gokhlayeh@8783 7 add_window_to_screen (SSScreen *screen, WnckWindow *wnck_window)
gokhlayeh@8783 8 {
gokhlayeh@8783 9 + WnckWorkspace *wnck_workspace;
gokhlayeh@8783 10 SSWindow *window;
gokhlayeh@8783 11 SSWorkspace *workspace;
gokhlayeh@8783 12 int n;
gokhlayeh@8783 13 @@ -513,7 +514,13 @@
gokhlayeh@8783 14 return NULL;
gokhlayeh@8783 15 }
gokhlayeh@8783 16
gokhlayeh@8783 17 - n = wnck_workspace_get_number (wnck_window_get_workspace (wnck_window));
gokhlayeh@8783 18 + wnck_workspace = wnck_window_get_workspace (wnck_window);
gokhlayeh@8783 19 +
gokhlayeh@8783 20 + if (wnck_workspace == NULL) {
gokhlayeh@8783 21 + return NULL;
gokhlayeh@8783 22 + }
gokhlayeh@8783 23 +
gokhlayeh@8783 24 + n = wnck_workspace_get_number (wnck_workspace);
gokhlayeh@8783 25 workspace = ss_screen_get_nth_workspace (screen, n);
gokhlayeh@8783 26
gokhlayeh@8783 27 window = ss_window_new (workspace, wnck_window);
gokhlayeh@8783 28 --- superswitcher/src/window.c
gokhlayeh@8783 29 +++ superswitcher/src/window.c
gokhlayeh@8783 30 @@ -254,6 +254,7 @@
gokhlayeh@8783 31 static void
gokhlayeh@8783 32 on_workspace_changed (WnckWindow *wnck_window, gpointer data)
gokhlayeh@8783 33 {
gokhlayeh@8783 34 + WnckWorkspace *wnck_workspace;
gokhlayeh@8783 35 SSWindow *window;
gokhlayeh@8783 36 SSWorkspace *old_workspace;
gokhlayeh@8783 37 SSWorkspace *new_workspace;
gokhlayeh@8783 38 @@ -261,12 +262,19 @@
gokhlayeh@8783 39
gokhlayeh@8783 40 window = (SSWindow *) data;
gokhlayeh@8783 41 old_workspace = window->workspace;
gokhlayeh@8783 42 - new_workspace_id = wnck_workspace_get_number (wnck_window_get_workspace (wnck_window));
gokhlayeh@8783 43 - new_workspace = ss_screen_get_nth_workspace (old_workspace->screen, new_workspace_id);
gokhlayeh@8783 44 -
gokhlayeh@8783 45 ss_workspace_remove_window (old_workspace, window);
gokhlayeh@8783 46 +
gokhlayeh@8783 47 + wnck_workspace = wnck_window_get_workspace (wnck_window);
gokhlayeh@8783 48 + if (wnck_workspace) {
gokhlayeh@8783 49 + new_workspace_id = wnck_workspace_get_number (wnck_workspace);
gokhlayeh@8783 50 + new_workspace = ss_screen_get_nth_workspace (old_workspace->screen, new_workspace_id);
gokhlayeh@8783 51 +
gokhlayeh@8783 52 + ss_workspace_add_window (new_workspace, window);
gokhlayeh@8783 53 + window->workspace = new_workspace;
gokhlayeh@8783 54 + } else {
gokhlayeh@8783 55 + window->workspace = NULL;
gokhlayeh@8783 56 + }
gokhlayeh@8783 57 +
gokhlayeh@8783 58 - window->workspace = new_workspace;
gokhlayeh@8783 59 - ss_workspace_add_window (new_workspace, window);
gokhlayeh@8783 60 window->new_window_index = -1;
gokhlayeh@8783 61 gtk_widget_queue_draw (gtk_widget_get_toplevel (window->widget));
gokhlayeh@8783 62 }