~ubuntu-branches/ubuntu/karmic/alltray/karmic

« back to all changes in this revision

Viewing changes to debian/patches/02-fix-compiz-windows-select.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Michael B. Trausch
  • Date: 2008-04-09 21:06:56 UTC
  • Revision ID: james.westby@ubuntu.com-20080409210656-756vwkfx6lvgkaf4
Tags: 0.69-1ubuntu2
* Only reparent with Compiz running when not in click_mode, so as to
  enable running alltray to dock an already-running application on
  the system. (LP: #106583)
* debian/rules:  Remove optimization from the compiled binary entirely,
  which appears to create side effects in the code, including an
  infinite loop condition that does not occur without optimization.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
-  if (!strcmp(win->window_manager, "Metacity")) {
47
47
-
48
 
+  if ((!strcmp(win->window_manager, "Metacity")) || (!strcmp(win->window_manager, "compiz"))) {
 
48
+  if ((!strcmp(win->window_manager, "Metacity"))) {
49
49
+    
50
50
     #ifndef GCONF_NOT_DISABLED
51
51
           printf ("\n\nAlltray: To use Alltray under Gnome, Gconf support should not be disabled.\n"
52
52
                   "         But it is.\n\n");
53
 
@@ -181,6 +182,10 @@
 
53
@@ -181,6 +182,16 @@
54
54
     win->no_reparent=TRUE;
55
55
   }
56
56
 
57
57
+  if (!strcmp(win->window_manager, "compiz")) {
 
58
+    #ifndef GCONF_NOT_DISABLED
 
59
+          printf ("\n\nAlltray: To use Alltray with Compiz, Gconf support should not be disabled.\n"
 
60
+                  "         But it is.\n\n");
 
61
+          exit (0);
 
62
+    #endif 
 
63
+
58
64
+     win->compiz = TRUE;
59
65
+  }
60
66
+
61
67
   if (!strcmp(win->window_manager, "KWin")) {
62
68
      win->kde=TRUE;
63
69
      win->no_reparent=TRUE;
64
 
@@ -237,6 +242,7 @@
 
70
@@ -193,7 +204,7 @@
 
71
 
 
72
     if (debug) printf ("click_mode\n");
 
73
     win->click_mode=TRUE;
 
74
-  
 
75
+
 
76
     if (win->kde && win->kde_close_button_pos == NO_SUCCESS) {
 
77
        if (!kde_show_configure_dialog (win)) {
 
78
          printf ("Configuration canceled. \"alltray -conf\" to reshow.\n");
 
79
@@ -237,6 +248,7 @@
65
80
 
66
81
     win->gnome=FALSE;
67
82
     win->kde=FALSE;
69
84
     win->no_reparent=TRUE;
70
85
   }
71
86
   
 
87
@@ -363,10 +375,15 @@
 
88
   if (!win->click_mode && !win->notray)
 
89
     wait_for_manager(win);
 
90
   
 
91
-  if (!win->click_mode)
 
92
+  if (!win->click_mode) {
 
93
     exec_and_wait_for_window(win);
 
94
-  else
 
95
+  } else {
 
96
+    if(win->compiz) {
 
97
+      win->no_reparent = TRUE;
 
98
+    }
 
99
+
 
100
     click_mode(win);
 
101
+  }
 
102
   
 
103
   if (win->xmms) {
 
104
     win->xmms_main_window_gdk=gdk_window_foreign_new(win->xmms_main_window_xlib);