Window management - pressing the 'restore' window indicator on a semi-maximised window should return it to the restored state

Reported by John Lea on 2011-06-13
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Ayatana Design
High
John Lea
Compiz
High
Unassigned
compiz (Ubuntu)
High
Unassigned

Bug Description

Note: See comment #12, semi-maximised windows are still not restoring to the correct position.

----------------

The 'restore' window indicator does not interact correctly with the semi-maximised or vertically-maximised states.

To reproduce:
1. Restore a window
2. Semi-maximise the same window
3. Press the restore indicator

What currently happens: The window maximizes
What should happen: The window should switch back to the restored state, with *exactly the same height and width it had before it was semi-maximised*

TESTCASE:

^ "What should happen" is what should happen ;-)

Note that this behaviour should also apply to the vertically-maximised window state.

John Lea (johnlea) on 2011-06-13
Changed in ayatana-design:
assignee: nobody → John Lea (johnlea)
tags: added: udo
Changed in ayatana-design:
status: New → Fix Committed
importance: Undecided → Critical
status: Fix Committed → Fix Released
John Lea (johnlea) on 2011-06-13
summary: - Window behaviour - pressing the 'restore' window indicator on a window
- that was previously semi-maximised should return it to a semi-maximised
- state
+ Window behaviour - pressing the 'restore' window indicator on a semi-
+ maximised window should return it to the restored state
John Lea (johnlea) on 2011-06-14
Changed in ayatana-design:
status: Fix Released → Fix Committed
Jason Smith (jassmith) on 2011-06-30
Changed in unity:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Sam Spilsbury (smspillaz)
John Lea (johnlea) on 2011-06-30
Changed in ayatana-design:
status: Fix Committed → Fix Released
Jorge O. Castro (jorge) on 2011-07-01
tags: added: backlog
Didier Roche (didrocks) on 2011-07-05
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity:
milestone: none → 4.18.0
Didier Roche (didrocks) on 2011-09-26
Changed in unity:
milestone: 4.18.0 → 4.20.0
Changed in compiz-grid-plugin:
status: New → In Progress
assignee: nobody → Sam Spilsbury (smspillaz)
milestone: none → 0.9.5.96
milestone: 0.9.5.96 → 0.9.6
importance: Undecided → High
Jason Smith (jassmith) on 2011-09-29
Changed in compiz-grid-plugin:
status: In Progress → Fix Committed
Changed in unity:
status: Confirmed → Fix Committed
Changed in unity (Ubuntu):
status: Confirmed → Fix Committed
Didier Roche (didrocks) on 2011-09-29
affects: unity (Ubuntu) → compiz-plugins-main (Ubuntu)
Changed in compiz-grid-plugin:
status: Fix Committed → Fix Released
Changed in unity:
status: Fix Committed → Fix Released
Didier Roche (didrocks) on 2011-09-29
Changed in unity:
milestone: 4.20.0 → 4.22.0

(still waiting on some merges)

Changed in compiz-grid-plugin:
status: Fix Released → In Progress
Changed in unity:
status: Fix Released → In Progress
Changed in compiz-plugins-main (Ubuntu):
status: Fix Committed → In Progress
Didier Roche (didrocks) on 2011-09-30
Changed in unity (Ubuntu):
status: New → In Progress
Changed in unity:
milestone: 4.22.0 → 4.24.0
Changed in compiz-grid-plugin:
status: In Progress → Fix Committed
Changed in unity:
status: In Progress → Fix Committed
Changed in compiz-plugins-main (Ubuntu):
status: In Progress → Fix Committed
Changed in unity (Ubuntu):
status: In Progress → Fix Committed
Changed in compiz:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → Sam Spilsbury (smspillaz)
description: updated
Alex Launi (alexlauni) on 2011-10-12
Changed in compiz (Ubuntu):
status: New → Fix Committed
importance: Undecided → High
Didier Roche (didrocks) on 2011-10-14
Changed in unity (Ubuntu):
status: Fix Committed → Invalid
Changed in unity:
status: Fix Committed → Invalid
Sam Spilsbury (smspillaz) wrote :
Download full text (5.7 KiB)

=== 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 & CompWindo...

Read more...

Changed in unity:
milestone: 4.24.0 → 4.26.0
John Lea (johnlea) on 2011-10-18
tags: added: udp
Changed in ayatana-design:
status: Fix Released → Fix Committed
Didier Roche (didrocks) on 2011-10-20
Changed in compiz-plugins-main (Ubuntu):
status: Fix Committed → Invalid
Changed in compiz-plugins-main (Ubuntu Oneiric):
status: New → Invalid
Didier Roche (didrocks) on 2011-10-20
Changed in unity (Ubuntu Oneiric):
status: New → Invalid
Changed in unity:
status: Invalid → Fix Committed
Changed in compiz-plugins-main (Ubuntu):
status: Invalid → Fix Committed
Changed in unity (Ubuntu):
status: Invalid → Fix Committed
Changed in compiz (Ubuntu Oneiric):
status: New → Fix Committed
Changed in compiz-plugins-main (Ubuntu Oneiric):
status: Invalid → Fix Committed
Changed in unity (Ubuntu Oneiric):
status: Invalid → Fix Committed
Didier Roche (didrocks) on 2011-11-09
Changed in compiz-plugins-main (Ubuntu Oneiric):
status: Fix Committed → Invalid
Changed in compiz-plugins-main (Ubuntu):
status: Fix Committed → Invalid
Changed in unity (Ubuntu):
status: Fix Committed → Invalid
Changed in unity (Ubuntu Oneiric):
status: Fix Committed → Invalid
Changed in compiz-grid-plugin:
status: Fix Committed → Invalid

Hello John, or anyone else affected,

Accepted compiz into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed

This bug was fixed in the package compiz - 1:0.9.6+bzr20110929-0ubuntu7

---------------
compiz (1:0.9.6+bzr20110929-0ubuntu7) precise; urgency=low

  * Upload to precise

compiz (1:0.9.6+bzr20110929-0ubuntu6) oneiric-proposed; urgency=low

  * debian/patches/rev_2821_fix_807487.patch:
    - unity-window-decorator crashed with SIGSEGV in
      g_datalist_id_set_data_full() (LP: #807487)
  * debian/patches/rev_2847_bug_796594.patch:
    - Window behaviour - pressing the 'restore' window indicator on a
      semi-maximised window should return it to the restored state
      (LP: #796594)
  * debian/patches/rev_2878_bug_865696.patch:
    - Windows from other workspaces missing decorations in window spread
      (LP: #865696)
  * debian/patches/rev_2884_fix_874004.patch:
    - When a window is minimized on another workspace it doesn't appear
      in the spread (LP: #874004)
  * debian/patches/rev_2890_fix_879253.patch:
    - Makes the previous patch building and not crashing.
  * Add some upstream missing bits from previous fixes:
    - debian/patches/fix-864330.patch
    - debian/patches/fix-864478.patch
  * debian/patches/fix-886978.patch:
    - compiz crashes with SIGSEGV in PrivateWindow::configure (LP: #886978)
 -- Didier Roche <email address hidden> Thu, 10 Nov 2011 09:11:57 +0100

Changed in compiz (Ubuntu):
status: Fix Committed → Fix Released
Miklos Juhasz (mjuhasz) wrote :

The proposed version resolves this bug. The semi-maximized window is not maximized but restored to the previous state.

In my opinion the window should be restored to its original height and width but the width of the window is not restored. The window remains half-screen wide but this fix is already an improvement.

Martin Pitt (pitti) on 2011-11-10
tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.6+bzr20110929-0ubuntu6

---------------
compiz (1:0.9.6+bzr20110929-0ubuntu6) oneiric-proposed; urgency=low

  * debian/patches/rev_2821_fix_807487.patch:
    - unity-window-decorator crashed with SIGSEGV in
      g_datalist_id_set_data_full() (LP: #807487)
  * debian/patches/rev_2847_bug_796594.patch:
    - Window behaviour - pressing the 'restore' window indicator on a
      semi-maximised window should return it to the restored state
      (LP: #796594)
  * debian/patches/rev_2878_bug_865696.patch:
    - Windows from other workspaces missing decorations in window spread
      (LP: #865696)
  * debian/patches/rev_2884_fix_874004.patch:
    - When a window is minimized on another workspace it doesn't appear
      in the spread (LP: #874004)
  * debian/patches/rev_2890_fix_879253.patch:
    - Makes the previous patch building and not crashing.
  * Add some upstream missing bits from previous fixes:
    - debian/patches/fix-864330.patch
    - debian/patches/fix-864478.patch
  * debian/patches/fix-886978.patch:
    - compiz crashes with SIGSEGV in PrivateWindow::configure (LP: #886978)
 -- Didier Roche <email address hidden> Thu, 20 Oct 2011 14:23:52 +0200

Changed in compiz (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Didier Roche (didrocks) on 2011-11-22
Changed in unity (Ubuntu):
status: Invalid → Fix Committed
Omer Akram (om26er) on 2011-12-08
no longer affects: compiz-plugins-main (Ubuntu)
no longer affects: compiz-plugins-main (Ubuntu Oneiric)
no longer affects: unity (Ubuntu Oneiric)
Changed in unity:
status: Fix Committed → Fix Released
Changed in unity (Ubuntu):
status: Fix Committed → Fix Released
no longer affects: compiz-grid-plugin
affects: compiz → compiz-core
Changed in compiz-core:
milestone: none → 0.9.7.0
Alan Pope ㋛ (popey) wrote :

With 0.9.7 from didrocks ppa on precise this seems fixed. I am able to drag windows to the side or top of the screen, and then use the restore button to get them back to their previous size (but not their previous location).

John Lea (johnlea) on 2012-02-20
Changed in ayatana-design:
importance: Critical → High
Changed in compiz-core:
status: Fix Committed → Fix Released
Nick Tait (jnick-tait) on 2012-03-07
tags: added: furtherdesignreviewrequiredp
John Lea (johnlea) wrote :

Reverted to confirmed because after testing it looks like this is still not fixed. To reproduce:

--- Test 1 ---

1. Take a restored Nautilus window
2. Drag it to the side of the screen to semi-maximise it
3. Press the 'restore' window decoration

What currently happens: The Nautilus window goes back to the restored state, with it's original height. However the width of the window changes, and it is not restored to it's original position

What should happen: The Nautilus window should return the window to the restored state, with the same height, width, and position it previously had before the user started the drag that shifted the window to the semi-maximised state.

--- Test 2 ---

1. Take a restored Thunderbird window
2. Drag it to the side of the screen to semi-maximise it
3. Press the 'restore' window decoration

What currently happens: Nothing!
What should happen: The Thunderbird window should return the window to the restored state, with the same height, width, and position it previously had before the user started the drag that shifted the window to the semi-maximised state.

description: updated
Changed in compiz (Ubuntu):
status: Fix Released → Confirmed
tags: removed: furtherdesignreviewrequiredp
Changed in unity (Ubuntu):
status: Fix Released → Confirmed
Changed in compiz (Ubuntu Oneiric):
status: Fix Released → Confirmed
Changed in unity:
status: Fix Released → Confirmed
Changed in compiz-core:
status: Fix Released → Confirmed
Changed in compiz:
assignee: nobody → Sam Spilsbury (smspillaz)
importance: Undecided → High
status: New → Confirmed
Omer Akram (om26er) on 2012-07-09
no longer affects: compiz-core
Daniel van Vugt (vanvugt) wrote :

Correction: The original bug described in the title and description is fixed.

The new bug mentioned in comment #8 was already reported 6 months earlier in bug 878516.

Changed in unity:
status: Confirmed → Invalid
Changed in unity (Ubuntu):
status: Confirmed → Invalid
description: updated
Changed in compiz:
status: Confirmed → Fix Released
Changed in compiz (Ubuntu):
status: Confirmed → Fix Released
John Lea (johnlea) wrote :

@vanvugt; that bug only referred to the issue when the window was restored by dragging downwards, so I have updated the bug description to include the case where the user clicks on the 'restore' window decoration button.

description: updated
tags: removed: udo udp
John Lea (johnlea) on 2012-07-10
Changed in unity (Ubuntu):
importance: Undecided → High

The window correctly restores its size before the semi-maximized user action started but it doesn't restore its position.
If the user action is the drag of the window on the side, the state restored should be the one before the dragging gesture started, not when the window touched the edge.

Changed in compiz:
status: Fix Released → Triaged
John Lea (johnlea) on 2012-09-05
no longer affects: unity
no longer affects: unity (Ubuntu)
John Lea (johnlea) on 2012-09-19
tags: added: udp

Still doesn't restore the window at the right location (the position the window had before the drag to semi-maximized gesture starts).

John Lea (johnlea) on 2012-10-02
Changed in compiz (Ubuntu):
status: Fix Released → Triaged
tags: removed: verification-done
John Lea (johnlea) on 2012-10-10
summary: - Window behaviour - pressing the 'restore' window indicator on a semi-
+ Window management - pressing the 'restore' window indicator on a semi-
maximised window should return it to the restored state
John Lea (johnlea) on 2012-10-10
Changed in ayatana-design:
importance: High → Critical
description: updated
John Lea (johnlea) on 2012-10-12
no longer affects: compiz (Ubuntu Oneiric)
John Lea (johnlea) on 2012-11-19
Changed in compiz:
assignee: Sam Spilsbury (smspillaz) → nobody
description: updated
John Lea (johnlea) on 2013-04-04
Changed in ayatana-design:
importance: Critical → High
Stephen M. Webb (bregma) wrote :

Marking as Fix Released because we can not reproduce this on released 13.04 desktops.

Changed in compiz:
status: Triaged → Fix Released
Changed in compiz (Ubuntu):
status: Triaged → Fix Released
John Lea (johnlea) on 2013-06-20
Changed in ayatana-design:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers