=== added file 'debian/patches/rev_2847_bug_796594.patch' --- debian/patches/rev_2847_bug_796594.patch 1970-01-01 00:00:00 +0000 +++ debian/patches/rev_2847_bug_796594.patch 2011-10-17 07:16:06 +0000 @@ -0,0 +1,161 @@ +=== modified file 'plugins/decor/src/decor.cpp' +Index: compiz-0.9.6+bzr20110929/plugins/decor/src/decor.cpp +=================================================================== +--- compiz-0.9.6+bzr20110929.orig/plugins/decor/src/decor.cpp 2011-10-17 15:12:20.278356818 +0800 ++++ compiz-0.9.6+bzr20110929/plugins/decor/src/decor.cpp 2011-10-17 15:12:22.718368920 +0800 +@@ -934,7 +934,7 @@ + if (!wd) + return false; + +- if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE) ++ if ((window->state () & MAXIMIZE_STATE)) + window->setWindowFrameExtents (&wd->decor->maxBorder, + &wd->decor->maxInput); + else if (!window->hasUnmapReference ()) +@@ -1084,7 +1084,7 @@ + else + parent = window->frame (); + +- if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE) ++ if ((window->state () & MAXIMIZE_STATE)) + { + border = wd->decor->maxBorder; + input = wd->decor->maxInput; +@@ -1214,7 +1214,7 @@ + int bw = server.border () * 2; + CompWindowExtents input; + +- if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE) ++ if ((window->state () & MAXIMIZE_STATE)) + input = wd->decor->maxInput; + else + input = wd->decor->input; +@@ -2007,7 +2007,7 @@ + int oldShiftY = shiftY (); + int moveDx, moveDy; + +- if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE) ++ if ((window->state () & MAXIMIZE_STATE)) + window->setWindowFrameExtents (&wd->decor->maxBorder, + &wd->decor->maxInput); + else +Index: compiz-0.9.6+bzr20110929/src/window.cpp +=================================================================== +--- compiz-0.9.6+bzr20110929.orig/src/window.cpp 2011-10-17 15:12:51.974513993 +0800 ++++ compiz-0.9.6+bzr20110929/src/window.cpp 2011-10-17 15:14:52.863113452 +0800 +@@ -3855,9 +3855,9 @@ + + if (state & CompWindowStateMaximizedVertMask) + { +- if (old.y () < y + workArea.y () + serverInput.top) ++ if (old.y () < y + workArea.y () + border.top) + { +- xwc->y = y + workArea.y () + serverInput.top; ++ xwc->y = y + workArea.y () + border.top; + mask |= CWY; + } + else +@@ -3865,16 +3865,16 @@ + height = xwc->height + old.border () * 2; + + max = y + workArea.bottom (); +- if (old.y () + (int) old.height () + serverInput.bottom > max) ++ if (old.y () + (int) old.height () + border.bottom > max) + { +- xwc->y = max - height - serverInput.bottom; ++ xwc->y = max - height - border.bottom; + mask |= CWY; + } +- else if (old.y () + height + serverInput.bottom > max) ++ else if (old.y () + height + border.bottom > max) + { + xwc->y = y + workArea.y () + +- (workArea.height () - serverInput.top - height - +- serverInput.bottom) / 2 + serverInput.top; ++ (workArea.height () - border.top - height - ++ border.bottom) / 2 + border.top; + mask |= CWY; + } + } +@@ -3882,9 +3882,9 @@ + + if (state & CompWindowStateMaximizedHorzMask) + { +- if (old.x () < x + workArea.x () + serverInput.left) ++ if (old.x () < x + workArea.x () + border.left) + { +- xwc->x = x + workArea.x () + serverInput.left; ++ xwc->x = x + workArea.x () + border.left; + mask |= CWX; + } + else +@@ -3892,16 +3892,16 @@ + width = xwc->width + old.border () * 2; + + max = x + workArea.right (); +- if (old.x () + (int) old.width () + serverInput.right > max) ++ if (old.x () + (int) old.width () + border.right > max) + { +- xwc->x = max - width - serverInput.right; ++ xwc->x = max - width - border.right; + mask |= CWX; + } +- else if (old.x () + width + serverInput.right > max) ++ else if (old.x () + width + border.right > max) + { + xwc->x = x + workArea.x () + +- (workArea.width () - serverInput.left - width - +- serverInput.right) / 2 + serverInput.left; ++ (workArea.width () - border.left - width - ++ border.right) / 2 + border.left; + mask |= CWX; + } + } +Index: compiz-0.9.6+bzr20110929/unity/unity_window_decorator/src/events.c +=================================================================== +--- compiz-0.9.6+bzr20110929.orig/unity/unity_window_decorator/src/events.c 2011-10-17 15:12:51.950513875 +0800 ++++ compiz-0.9.6+bzr20110929/unity/unity_window_decorator/src/events.c 2011-10-17 15:15:28.971292509 +0800 +@@ -136,28 +136,27 @@ + { + if (state == BUTTON_EVENT_ACTION_STATE) + { +- if (gtkwd_event->button == 2) ++ if (wnck_window_is_maximized (win)) ++ wnck_window_unmaximize (win); ++ if (wnck_window_is_maximized_vertically (win)) ++ wnck_window_unmaximize_vertically (win); ++ else if (wnck_window_is_maximized_horizontally (win)) ++ wnck_window_unmaximize_horizontally (win); ++ else + { +- if (wnck_window_is_maximized_vertically (win)) +- wnck_window_unmaximize_vertically (win); +- else ++ if (gtkwd_event->button == 2) ++ { + wnck_window_maximize_vertically (win); +- } +- else if (gtkwd_event->button == 3) +- { +- if (wnck_window_is_maximized_horizontally (win)) +- wnck_window_unmaximize_horizontally (win); +- else ++ } ++ else if (gtkwd_event->button == 3) ++ { + wnck_window_maximize_horizontally (win); +- } +- else +- { +- if (wnck_window_is_maximized (win)) +- wnck_window_unmaximize (win); ++ } + else ++ { + wnck_window_maximize (win); ++ } + } +- } + } + break; + default:
This ensures that pressing the maximize button on a semi-maximized window will actually un-semi-maximize it.
=== added file 'debian/ patches/ rev_2847_ bug_796594. patch' patches/ rev_2847_ bug_796594. patch 1970-01-01 00:00:00 +0000 patches/ rev_2847_ bug_796594. patch 2011-10-17 07:16:06 +0000 decor/src/ decor.cpp' 0.9.6+bzr201109 29/plugins/ decor/src/ decor.cpp ======= ======= ======= ======= ======= ======= ======= ======= ===== 0.9.6+bzr201109 29.orig/ plugins/ decor/src/ decor.cpp 2011-10-17 15:12:20.278356818 +0800 0.9.6+bzr201109 29/plugins/ decor/src/ decor.cpp 2011-10-17 15:12:22.718368920 +0800 >setWindowFrame Extents (&wd->decor- >maxBorder, >maxInput) ; >hasUnmapRefere nce ()) >maxBorder; >maxInput; >maxInput; >setWindowFrame Extents (&wd->decor- >maxBorder, >maxInput) ; 0.9.6+bzr201109 29/src/ window. cpp ======= ======= ======= ======= ======= ======= ======= ======= ===== 0.9.6+bzr201109 29.orig/ src/window. cpp 2011-10-17 15:12:51.974513993 +0800 0.9.6+bzr201109 29/src/ window. cpp 2011-10-17 15:14:52.863113452 +0800 MaximizedVertMa sk) MaximizedHorzMa sk) 0.9.6+bzr201109 29/unity/ unity_window_ decorator/ src/events. c ======= ======= ======= ======= ======= ======= ======= ======= ===== 0.9.6+bzr201109 29.orig/ unity/unity_ window_ decorator/ src/events. c 2011-10-17 15:12:51.950513875 +0800 0.9.6+bzr201109 29/unity/ unity_window_ decorator/ src/events. c 2011-10-17 15:15:28.971292509 +0800 EVENT_ACTION_ STATE) event-> button == 2) is_maximized (win)) unmaximize (win); is_maximized_ vertically (win)) unmaximize_ vertically (win); is_maximized_ horizontally (win)) unmaximize_ horizontally (win); is_maximized_ vertically (win)) unmaximize_ vertically (win); event-> button == 2) maximize_ vertically (win); event-> button == 3) is_maximized_ horizontally (win)) unmaximize_ horizontally (win); event-> button == 3) maximize_ horizontally (win); is_maximized (win)) unmaximize (win); maximize (win);
--- debian/
+++ debian/
@@ -0,0 +1,161 @@
+=== modified file 'plugins/
+Index: compiz-
+======
+--- compiz-
++++ compiz-
+@@ -934,7 +934,7 @@
+ if (!wd)
+ return false;
+
+- if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE)
++ if ((window->state () & MAXIMIZE_STATE))
+ window-
+ &wd->decor-
+ else if (!window-
+@@ -1084,7 +1084,7 @@
+ else
+ parent = window->frame ();
+
+- if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE)
++ if ((window->state () & MAXIMIZE_STATE))
+ {
+ border = wd->decor-
+ input = wd->decor-
+@@ -1214,7 +1214,7 @@
+ int bw = server.border () * 2;
+ CompWindowExtents input;
+
+- if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE)
++ if ((window->state () & MAXIMIZE_STATE))
+ input = wd->decor-
+ else
+ input = wd->decor->input;
+@@ -2007,7 +2007,7 @@
+ int oldShiftY = shiftY ();
+ int moveDx, moveDy;
+
+- if ((window->state () & MAXIMIZE_STATE) == MAXIMIZE_STATE)
++ if ((window->state () & MAXIMIZE_STATE))
+ window-
+ &wd->decor-
+ else
+Index: compiz-
+======
+--- compiz-
++++ compiz-
+@@ -3855,9 +3855,9 @@
+
+ if (state & CompWindowState
+ {
+- if (old.y () < y + workArea.y () + serverInput.top)
++ if (old.y () < y + workArea.y () + border.top)
+ {
+- xwc->y = y + workArea.y () + serverInput.top;
++ xwc->y = y + workArea.y () + border.top;
+ mask |= CWY;
+ }
+ else
+@@ -3865,16 +3865,16 @@
+ height = xwc->height + old.border () * 2;
+
+ max = y + workArea.bottom ();
+- if (old.y () + (int) old.height () + serverInput.bottom > max)
++ if (old.y () + (int) old.height () + border.bottom > max)
+ {
+- xwc->y = max - height - serverInput.bottom;
++ xwc->y = max - height - border.bottom;
+ mask |= CWY;
+ }
+- else if (old.y () + height + serverInput.bottom > max)
++ else if (old.y () + height + border.bottom > max)
+ {
+ xwc->y = y + workArea.y () +
+- (workArea.height () - serverInput.top - height -
+- serverInput.bottom) / 2 + serverInput.top;
++ (workArea.height () - border.top - height -
++ border.bottom) / 2 + border.top;
+ mask |= CWY;
+ }
+ }
+@@ -3882,9 +3882,9 @@
+
+ if (state & CompWindowState
+ {
+- if (old.x () < x + workArea.x () + serverInput.left)
++ if (old.x () < x + workArea.x () + border.left)
+ {
+- xwc->x = x + workArea.x () + serverInput.left;
++ xwc->x = x + workArea.x () + border.left;
+ mask |= CWX;
+ }
+ else
+@@ -3892,16 +3892,16 @@
+ width = xwc->width + old.border () * 2;
+
+ max = x + workArea.right ();
+- if (old.x () + (int) old.width () + serverInput.right > max)
++ if (old.x () + (int) old.width () + border.right > max)
+ {
+- xwc->x = max - width - serverInput.right;
++ xwc->x = max - width - border.right;
+ mask |= CWX;
+ }
+- else if (old.x () + width + serverInput.right > max)
++ else if (old.x () + width + border.right > max)
+ {
+ xwc->x = x + workArea.x () +
+- (workArea.width () - serverInput.left - width -
+- serverInput.right) / 2 + serverInput.left;
++ (workArea.width () - border.left - width -
++ border.right) / 2 + border.left;
+ mask |= CWX;
+ }
+ }
+Index: compiz-
+======
+--- compiz-
++++ compiz-
+@@ -136,28 +136,27 @@
+ {
+ if (state == BUTTON_
+ {
+- if (gtkwd_
++ if (wnck_window_
++ wnck_window_
++ if (wnck_window_
++ wnck_window_
++ else if (wnck_window_
++ wnck_window_
++ else
+ {
+- if (wnck_window_
+- wnck_window_
+- else
++ if (gtkwd_
++ {
+ wnck_window_
+- }
+- else if (gtkwd_
+- {
+- if (wnck_window_
+- wnck_window_
+- else
++ }
++ else if (gtkwd_
++ {
+ wnck_window_
+- }
+- else
+- {
+- if (wnck_window_
+- wnck_window_
++ }
+ else
++ {
+ wnck_window_
++ }
+ }
+- }
+ }
+ break;
+ default:
This ensures that pressing the maximize button on a semi-maximized window will actually un-semi-maximize it.