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

Bug #796594 reported by John Lea
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Ayatana Design
Fix Released
High
John Lea
Compiz
Fix Released
High
Unassigned
compiz (Ubuntu)
Fix Released
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.

Related branches

John Lea (johnlea)
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)
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)
Changed in ayatana-design:
status: Fix Released → Fix Committed
Jason Smith (jassmith)
Changed in unity:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Sam Spilsbury (smspillaz)
John Lea (johnlea)
Changed in ayatana-design:
status: Fix Committed → Fix Released
Jorge Castro (jorge)
tags: added: backlog
Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity:
milestone: none → 4.18.0
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)
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
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
Changed in unity:
milestone: 4.20.0 → 4.22.0
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Re: Window behaviour - pressing the 'restore' window indicator on a semi-maximised window should return it to the restored state

(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
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)
Changed in compiz (Ubuntu):
status: New → Fix Committed
importance: Undecided → High
Changed in unity (Ubuntu):
status: Fix Committed → Invalid
Changed in unity:
status: Fix Committed → Invalid
Revision history for this message
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)
tags: added: udp
Changed in ayatana-design:
status: Fix Released → Fix Committed
Changed in compiz-plugins-main (Ubuntu):
status: Fix Committed → Invalid
Changed in compiz-plugins-main (Ubuntu Oneiric):
status: New → Invalid
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
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
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

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
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: Window behaviour - pressing the 'restore' window indicator on a semi-maximised window should return it to the restored state

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
Revision history for this message
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)
tags: added: verification-done
removed: verification-needed
Revision history for this message
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
Changed in unity (Ubuntu):
status: Invalid → Fix Committed
Omer Akram (om26er)
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
Revision history for this message
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)
Changed in ayatana-design:
importance: Critical → High
Changed in compiz-core:
status: Fix Committed → Fix Released
Nick Tait (jnick-tait)
tags: added: furtherdesignreviewrequiredp
Revision history for this message
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)
no longer affects: compiz-core
Revision history for this message
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
Revision history for this message
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)
Changed in unity (Ubuntu):
importance: Undecided → High
Revision history for this message
Christian Giordano (nuthinking) wrote :

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)
no longer affects: unity
no longer affects: unity (Ubuntu)
John Lea (johnlea)
tags: added: udp
Revision history for this message
Christian Giordano (nuthinking) wrote :

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)
Changed in compiz (Ubuntu):
status: Fix Released → Triaged
tags: removed: verification-done
John Lea (johnlea)
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)
Changed in ayatana-design:
importance: High → Critical
description: updated
John Lea (johnlea)
no longer affects: compiz (Ubuntu Oneiric)
John Lea (johnlea)
Changed in compiz:
assignee: Sam Spilsbury (smspillaz) → nobody
description: updated
John Lea (johnlea)
Changed in ayatana-design:
importance: Critical → High
Revision history for this message
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)
Changed in ayatana-design:
status: Fix Committed → Fix Released
tags: added: rls-w-incoming
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.