wok-next diff superswitcher/stuff/superswitcher-0.6-wnck-workspace.patch @ rev 14988

thunderbird-langpack-*: fix TARBALL, add VERSION to poison src cache
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Aug 09 00:43:47 2013 +0000 (2013-08-09)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/superswitcher/stuff/superswitcher-0.6-wnck-workspace.patch	Fri Aug 09 00:43:47 2013 +0000
     1.3 @@ -0,0 +1,62 @@
     1.4 +It seems like wnck_window_is_skip_pager isn't all we need to check.
     1.5 +
     1.6 +--- superswitcher/src/screen.c
     1.7 ++++ superswitcher/src/screen.c
     1.8 +@@ -505,6 +505,7 @@
     1.9 + static SSWindow *
    1.10 + add_window_to_screen (SSScreen *screen, WnckWindow *wnck_window)
    1.11 + {
    1.12 ++  WnckWorkspace *wnck_workspace;
    1.13 +   SSWindow *window;
    1.14 +   SSWorkspace *workspace;
    1.15 +   int n;
    1.16 +@@ -513,7 +514,13 @@
    1.17 +     return NULL;
    1.18 +   }
    1.19 + 
    1.20 +-  n = wnck_workspace_get_number (wnck_window_get_workspace (wnck_window));
    1.21 ++  wnck_workspace = wnck_window_get_workspace (wnck_window);
    1.22 ++
    1.23 ++  if (wnck_workspace == NULL) {
    1.24 ++    return NULL;
    1.25 ++  }
    1.26 ++
    1.27 ++  n = wnck_workspace_get_number (wnck_workspace);
    1.28 +   workspace = ss_screen_get_nth_workspace (screen, n);
    1.29 + 
    1.30 +   window = ss_window_new (workspace, wnck_window);
    1.31 +--- superswitcher/src/window.c
    1.32 ++++ superswitcher/src/window.c
    1.33 +@@ -254,6 +254,7 @@
    1.34 + static void
    1.35 + on_workspace_changed (WnckWindow *wnck_window, gpointer data)
    1.36 + {
    1.37 ++  WnckWorkspace *wnck_workspace;
    1.38 +   SSWindow *window;
    1.39 +   SSWorkspace *old_workspace;
    1.40 +   SSWorkspace *new_workspace;
    1.41 +@@ -261,12 +262,19 @@
    1.42 + 
    1.43 +   window = (SSWindow *) data;
    1.44 +   old_workspace = window->workspace;
    1.45 +-  new_workspace_id = wnck_workspace_get_number (wnck_window_get_workspace (wnck_window));
    1.46 +-  new_workspace = ss_screen_get_nth_workspace (old_workspace->screen, new_workspace_id);
    1.47 +-
    1.48 +   ss_workspace_remove_window (old_workspace, window);
    1.49 ++
    1.50 ++  wnck_workspace = wnck_window_get_workspace (wnck_window);
    1.51 ++  if (wnck_workspace) {
    1.52 ++    new_workspace_id = wnck_workspace_get_number (wnck_workspace);
    1.53 ++    new_workspace = ss_screen_get_nth_workspace (old_workspace->screen, new_workspace_id);
    1.54 ++
    1.55 ++    ss_workspace_add_window (new_workspace, window);
    1.56 ++    window->workspace = new_workspace;
    1.57 ++  } else {
    1.58 ++    window->workspace = NULL;
    1.59 ++  }
    1.60 ++
    1.61 +-  window->workspace = new_workspace;
    1.62 +-  ss_workspace_add_window (new_workspace, window);
    1.63 +   window->new_window_index = -1;
    1.64 +   gtk_widget_queue_draw (gtk_widget_get_toplevel (window->widget));
    1.65 + }