wok-current view superswitcher/stuff/superswitcher-0.6-wnck-workspace.patch @ rev 21675
updated pflogsumm (1.1.3 -> 1.1.5)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Jun 01 16:52:31 2019 +0100 (2019-06-01) |
parents | |
children |
line source
1 It seems like wnck_window_is_skip_pager isn't all we need to check.
3 --- superswitcher/src/screen.c
4 +++ superswitcher/src/screen.c
5 @@ -505,6 +505,7 @@
6 static SSWindow *
7 add_window_to_screen (SSScreen *screen, WnckWindow *wnck_window)
8 {
9 + WnckWorkspace *wnck_workspace;
10 SSWindow *window;
11 SSWorkspace *workspace;
12 int n;
13 @@ -513,7 +514,13 @@
14 return NULL;
15 }
17 - n = wnck_workspace_get_number (wnck_window_get_workspace (wnck_window));
18 + wnck_workspace = wnck_window_get_workspace (wnck_window);
19 +
20 + if (wnck_workspace == NULL) {
21 + return NULL;
22 + }
23 +
24 + n = wnck_workspace_get_number (wnck_workspace);
25 workspace = ss_screen_get_nth_workspace (screen, n);
27 window = ss_window_new (workspace, wnck_window);
28 --- superswitcher/src/window.c
29 +++ superswitcher/src/window.c
30 @@ -254,6 +254,7 @@
31 static void
32 on_workspace_changed (WnckWindow *wnck_window, gpointer data)
33 {
34 + WnckWorkspace *wnck_workspace;
35 SSWindow *window;
36 SSWorkspace *old_workspace;
37 SSWorkspace *new_workspace;
38 @@ -261,12 +262,19 @@
40 window = (SSWindow *) data;
41 old_workspace = window->workspace;
42 - new_workspace_id = wnck_workspace_get_number (wnck_window_get_workspace (wnck_window));
43 - new_workspace = ss_screen_get_nth_workspace (old_workspace->screen, new_workspace_id);
44 -
45 ss_workspace_remove_window (old_workspace, window);
46 +
47 + wnck_workspace = wnck_window_get_workspace (wnck_window);
48 + if (wnck_workspace) {
49 + new_workspace_id = wnck_workspace_get_number (wnck_workspace);
50 + new_workspace = ss_screen_get_nth_workspace (old_workspace->screen, new_workspace_id);
51 +
52 + ss_workspace_add_window (new_workspace, window);
53 + window->workspace = new_workspace;
54 + } else {
55 + window->workspace = NULL;
56 + }
57 +
58 - window->workspace = new_workspace;
59 - ss_workspace_add_window (new_workspace, window);
60 window->new_window_index = -1;
61 gtk_widget_queue_draw (gtk_widget_get_toplevel (window->widget));
62 }