/[gentoo-x86]/x11-misc/superswitcher/files/superswitcher-0.6-wnck-workspace.patch
Gentoo

Contents of /x11-misc/superswitcher/files/superswitcher-0.6-wnck-workspace.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Oct 23 16:54:23 2007 UTC (7 years, 6 months ago) by swegener
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +35 -0 lines
Update patch to fix another segmentation fault.
(Portage version: 2.1.3.15)

1 It seems like wnck_window_is_skip_pager isn't all we need to check.
2
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 }
16
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);
26
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 @@
39
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 }

  ViewVC Help
Powered by ViewVC 1.1.20