[FFE][UIFE] Window management - We should be able to close windows in spread mode

Bug #876017 reported by Simon
134
This bug affects 37 people
Affects Status Importance Assigned to Milestone
Ayatana Design
Fix Released
Medium
John Lea
Unity
Fix Released
Medium
Renato Araujo Oliveira Filho
ubuntu-docs (Ubuntu)
Won't Fix
Low
Unassigned
unity (Ubuntu)
Fix Released
Medium
lynda scheidt

Bug Description

== Proposed Change ==

Add a small titlebar to each window in spread mode with just a close button. Allows users to close windows in the spread

== Test ==

None as of yet.

This code is mostly all UI/Rendering code and wasn't exactly testable. It might be worthwhile looking into writing AP tests for the close functionality. The two revisions in question are:

http://bazaar.launchpad.net/~unity-team/unity/trunk/revision/2650
http://bazaar.launchpad.net/~unity-team/unity/trunk/revision/2662

I can vouch as the reviewer that the code was written correctly and functions like the other compiz draw-on-windows code.

== Contingency? ==

We should just be able to revert those revisions. As nothing else is planned to change on those code sections, reverting them should be trivial.

1.Open 3 windows of nautilus or any application.
2. Click on the application's icon in the launcher to activate spread mode.
3. If you want to close one of the windows, you have to click on its preview, than close it when it has focus. However, we should be able to close it directly in spread mode (like in gnome shell) by clicking on a close button in the upper left corner of each preview.

I attached a picture of how its done in gnome shell.

-------------------------
Note from design:

This feature will be added as part of 'The Spread', for more details see:

- http://design.canonical.com/2012/03/task-switching-in-ubuntu-and-a-introduction-to-the-spread/

- http://design.canonical.com/the-toolkit/unity-task-switching/

Related branches

Revision history for this message
Simon (nowis74) wrote :
Revision history for this message
Omer Akram (om26er) wrote :

me too :-)

Changed in unity:
status: New → Incomplete
Changed in unity (Ubuntu):
status: New → Incomplete
Revision history for this message
John Lea (johnlea) wrote :

Thanks for your bug report, we are aware of this issue and looking at possible solutions.

Revision history for this message
Sebastien Bacher (seb128) wrote :

That got some design work, you can read about it there:
http://design.canonical.com/2012/03/task-switching-in-ubuntu-and-a-introduction-to-the-spread/

the blog mentions that

"Moving the pointer over any of the previews will display the window name in a window title bar, and a close button is included so that any window can be dismissed directly from this view."

Changed in unity (Ubuntu):
importance: Undecided → Wishlist
Changed in unity:
importance: Undecided → Wishlist
status: Incomplete → Confirmed
Changed in unity (Ubuntu):
status: Incomplete → Triaged
Changed in compiz-core:
status: New → Confirmed
importance: Undecided → Wishlist
Changed in compiz (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Changed in compiz-core:
status: Confirmed → Triaged
Changed in compiz:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Petko Ditchev (pditchev) wrote :

I suggest the option in CCSM->Scale addons->close_button - just set middle click as a default . It's a universal nowadays principle - middle click opens in a new tab or closes tabs . I even think that was a default option some time ago .

John Lea (johnlea)
description: updated
tags: added: udp
Changed in ayatana-design:
assignee: nobody → John Lea (johnlea)
importance: Undecided → Medium
status: New → Triaged
Changed in unity:
status: Confirmed → Triaged
importance: Wishlist → Medium
Changed in compiz (Ubuntu):
importance: Wishlist → Medium
Changed in unity (Ubuntu):
importance: Wishlist → Medium
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

Also note that you can close windows in spread/scale mode by using Alt+F4

John Lea (johnlea)
summary: - We should be able to close windows in spread mode
+ Window management - We should be able to close windows in spread mode
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Re: Window management - We should be able to close windows in spread mode

Difficulty: Medium
Method:
1) Make unity depend on the scale plugin
2) Make unity::UnityWindow inherit from ScaleWindow
3) Make UnityWindow overload scalePaintDecoration
4) Load a small texture asset with an X button (or appropriate equavilent) and paint it at the correct location when appropriate
Test: The main thing for testing here is the code to position the texture in the right place over the window. I believe ScalePaintDecoration gives you a ScaleSlot, which you can use to determine the geometry of the scaled window, from there we just need to test that our code puts the button in the right place for that geometry

Ugo Riboni (uriboni)
Changed in unity:
assignee: nobody → Ugo Riboni (uriboni)
Ugo Riboni (uriboni)
Changed in unity:
assignee: Ugo Riboni (uriboni) → nobody
John Lea (johnlea)
Changed in ayatana-design:
status: Triaged → Fix Committed
Olivier Tilloy (osomon)
Changed in unity:
assignee: nobody → Renato Araujo Oliveira Filho (renatofilho)
Changed in unity:
status: Triaged → In Progress
Changed in unity:
milestone: none → 6.4
status: In Progress → Fix Committed
milestone: 6.4 → none
Revision history for this message
Loris Zinsou (nepenthes) wrote :

I have a notice on this bug :
- if the window was already decorated when scale is triggered, the title bar in scale mode can be clicked to select the window. This is obviously a correct behaviour.
- if the window was undecorated (ie : maximized) when scale is triggered, the title bar cannot be clicked to select the window. It seems wrong to me.

Shall I open a new bug ? (I'm running Unity Staging from the PPA)

Revision history for this message
Loris Zinsou (nepenthes) wrote :

There is also a small graphical glitch : I can see white dots on in the corner of the scale mode window decorations.

Revision history for this message
Loris Zinsou (nepenthes) wrote :

Last thing : if the fix is based on the panel code, shouldn't there be a "fade" effect on the window title if it overflows the right border of scale decoration ?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Update: Unity 6.4 is revision 2632, so this is actually fix committed for Unity 6.6.

Changed in unity:
milestone: none → 6.6
summary: - Window management - We should be able to close windows in spread mode
+ [FFE] Window management - We should be able to close windows in spread
+ mode
description: updated
summary: - [FFE] Window management - We should be able to close windows in spread
- mode
+ [FFE][UIFE] Window management - We should be able to close windows in
+ spread mode
Revision history for this message
Jeremy Bícha (jbicha) wrote :

For the benefit of those not running Unity trunk, could you attach a screenshot?

+1 from the Docs Team. Adding a docs task so that we can try to add a sentence about this new feature.

Changed in ubuntu-docs (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Omer Akram (om26er)
Changed in unity (Ubuntu):
status: Triaged → Fix Committed
no longer affects: compiz-core
Revision history for this message
Stéphane Graber (stgraber) wrote :

Have the issues highlighted by Loris Zinsou been fixed?

I'm also a bit confused on exactly what packages are affected by this change, the bug seems to affect both unity and compiz but only a unity branch has been attached.

Besides these two points I'd like to see clarified, the actual change seems alright and has been approved by the doc team.

Revision history for this message
Omer Akram (om26er) wrote :

Sorry, no specific change in compiz is needed for this.

no longer affects: compiz
no longer affects: compiz (Ubuntu)
Revision history for this message
John Lea (johnlea) wrote :
Revision history for this message
Stéphane Graber (stgraber) wrote :

Thanks for dropping the compiz task and for the screenshot. I'm marking this bug as incomplete until we get some kind of feeback on Loris' notes above.

Changed in unity (Ubuntu):
status: Fix Committed → Incomplete
Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

Screenshot showing unity without this feature (for before vs Johns after image)

Changed in unity:
milestone: 6.6 → 7.0
Revision history for this message
John Lea (johnlea) wrote :

@the-lz-himself; this change is faking everything (not using the panel code) so there will be some graphical differences.

Changed in unity (Ubuntu):
status: Incomplete → New
Revision history for this message
John Lea (johnlea) wrote :

@the-lz-himself;

re. your comment:

"I have a notice on this bug :
- if the window was already decorated when scale is triggered, the title bar in scale mode can be clicked to select the window. This is obviously a correct behaviour.
- if the window was undecorated (ie : maximized) when scale is triggered, the title bar cannot be clicked to select the window. It seems wrong to me."

Yes, please open a bug with the second issue and ping me the bug number.

This does need to be fixed, but should not block this change from landing.

thanks,
John

Revision history for this message
Stéphane Graber (stgraber) wrote :

As I mentioned on IRC when poked about this bug, I don't agree with John's last comment to just file a new bug and accept the new feature.

I'd expect any feature landing through the FeatureFreezeException process to be "perfect" in the sense that it has no known issue, what you're saying above is that this is a known bug and might be fixed in the future, so goes against that principle.

So I'm not going to grant the FFe until the known issues with this feature are all fixed, someone else from -release is obviously welcome to disagree with me and accept the exception.

Revision history for this message
Kate Stewart (kate.stewart) wrote :

From the comments above, it doesn't feel that the design is complete and fully tested at this point. This should be retargetted to land in the R series.

Changed in unity (Ubuntu Quantal):
status: New → Won't Fix
Revision history for this message
Omer Akram (om26er) wrote :

I would request the release team to reconsider this as I believe the issue that was raised above does not exist in the latest code, plus I have been testing this feature for a few days and it seems to work fine for me.

I have attached a video to show that the bug does not exist in latest code.

Revision history for this message
Petko Ditchev (pditchev) wrote :

 If the new feature is still buggy or cannot pass the feature freeze , I strongly suggest at least setting the close-on-middle-click as a default . I think it should be there even if the close button gets implemented , because it's a far easier and faster way to manage the windows (not to mention intuitive since all tabs get handled that way now) .

Revision history for this message
Jeremy Bícha (jbicha) wrote :

I don't believe I've ever used middle-click to close tabs before you mentioned it, so I wouldn't call it intuitive. It's not near as documented as Ctrl+W is (which self-documents in traditional menus). And it doesn't work for all tabbed interfaces: it fails in gedit, gnome-terminal, nautilus, and epiphany-browser.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

What Omer says it's true... These comments are based on an old version of this feature: the one that initially landed in trunk; I also noticed some issues on it and so I immediately requested some fixes to Renato that he promptly did in lp:~renatofilho/unity/unity-lp876017-fixes. I also integrated his fixes with some improvements in lp:~3v1n0/unity/spread-title-improved, lp:~3v1n0/unity/use-scale-getSelectedWindow and lp:~3v1n0/unity/use-scale-getSelectedWindow.

So, as Omer pointed out, I think that the main problems you've noticed on this feature are actually not present in the current code.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

@Loris:

> Last thing : if the fix is based on the panel code, shouldn't there be a "fade"
> effect on the window title if it overflows the right border of scale decoration ?

That was my request too, and it was added... Since we now we use the same code (even if it is not shared yet) to draw both.

> - if the window was undecorated (ie : maximized) when scale is triggered, the title bar
> cannot be clicked to select the window. It seems wrong to me.

Fixed as well on trunk.

Revision history for this message
Perseid (perseid) wrote :

I'd like to urge you to have this feature released in Quantal. Gnome 3 has had this feature from the very beginning and I've been waiting for it to appear in Unity for one and a half year already. It's really a usability bummer.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Based on Marco's comment, FFe accepted.
This is conditional on the change landing before the 20th of September at 21:00 UTC.
Please also be prepared to revert this change should any bug/regression be reported after this lands.

Changed in unity (Ubuntu Quantal):
status: Won't Fix → Triaged
no longer affects: unity (Ubuntu R-series)
no longer affects: ubuntu-docs (Ubuntu R-series)
Changed in unity (Ubuntu Quantal):
milestone: none → ubuntu-12.10-beta-2
Revision history for this message
Amr Ibrahim (amribrahim1987) wrote : Re: [Bug 876017] Re: [FFE][UIFE] Window management - We should be able to close windows in spread mode

On 18/09/12 21:49, Petko Ditchev wrote:
> If the new feature is still buggy or cannot pass the feature freeze , I
> strongly suggest at least setting the close-on-middle-click as a default
> . I think it should be there even if the close button gets implemented ,
> because it's a far easier and faster way to manage the windows (not to
> mention intuitive since all tabs get handled that way now) .
>
I strongly back up to close with a middle-click as a default. All web
browsers implement this. It is not our problem that other applications
are lagging behind. Not to mention that in Nautilus, with a
middle-click, you can open a new tab, but you can't close it with the
same click!!! in contrast with all web browsers.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

You can already close scaled windows with a middle click if you want. Just load the compiz plugin: scaleaddon

Revision history for this message
John Lea (johnlea) wrote :

@amribrahim1987, @vanvugt; I have reported this request as a separate bug, see bug #1052821

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

@vanvugt: scaleaddons doesn't seem to play nicely with this :o

However, I think it would be better to handle both in unity itself at this point.

Omer Akram (om26er)
no longer affects: unity/6.0
Changed in unity:
milestone: 7.0 → 6.6
Revision history for this message
David Planella (dpm) wrote : Re: [UIFE][FFE] Add close button to spread mode

Al 10/09/12 10:03, En/na Sam Spilsbury ha escrit:
> Hi All
>
> We have a change that has gone into trunk which makes the titlebars of
> windows have only a clickable "close" button during spread mode.
>
> The only thing that needs to be changed are screenshots of the spread
> mode, which a note that clicking on the close button closes the window.
>
> (LP: #876017)
>
> Cheers,
>
> Sam
>

Does not affect translatable strings, no objections from the
translations team.

Cheers,
David.

--
David Planella
Ubuntu Translations Coordinator
www.ubuntu.com / www.davidplanella.wordpress.com
www.identi.ca/dplanella / www.twitter.com/dplanella

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (9.2 KiB)

This bug was fixed in the package unity - 6.6.0-0ubuntu1

---------------
unity (6.6.0-0ubuntu1) quantal-proposed; urgency=low

  * New upstream release.
    - Fixes non-escaped character sequences in dash previews (LP: #1039020)
    - Updated background layer for preview cover-art and details panels
      to be 10% low-light
    - Expand a PlacesGroup if it is the only category that contains results
      (LP: #950710)
    - Update unity autopilot tests to match autopilot API
    - Updated the convert files to fix some typos in the key names
    - Add gmodule dependency
    - Activate proper result if the categories aren't displayed in-order
      (LP: #1040101)
    - Refactor device launcher icons (LP: #713423)
    - LauncherController: make the controller enable the launcher struts,
      based on hide-mode option (LP: #1044005)
    - Launcher: make always possible to drag an icon to the bottom or top
      of its sub list (LP: #1043968)
    - Don't desat bfb/hud icon in DNDReset (LP: #1043963)
    - Progressively adjust the speed of the minimize animation. First
      time it is used is slower, then speeds up the more it is used.
      (LP: #1017510)
    - Implement new ordering of categories for home lens. (LP: #1043915)
    - UnityWindow now implements ScaleWindowInterface (LP: #876017)
    - Launcher: restore an icon position after that the dragging has been
      cancelled (LP: #955561)
    - LauncherDragWindow: cancel drag on window mapped/unmapped
      (LP: #1044723)
    - Now there is a check of an override color in RefreshColor (which is
      called when a PropertyNotify event happens). Also added a check in
      FullySaturateColor to a void division by zero. (LP: #975350)
    - Queue redraw after cover-art texture is updated from a url/file source.
      (LP: #1043947)
    - Fixed ability to delete glib::Source wrapper during its callback
      (LP: #1044823)
    - Close preview when dash is hidden. (LP: #1045298)
    - LauncherModel: rewrite the Reordering functions to keep the icon
      priority deltas (LP: #761155)
    - Make sure we can pass extra hints when activating preview actions.
      (LP: #1046352)
    - UnityWindow: scale window code improved (LP: #1033935)
    - The mouse will now cause the HUD buttons to change selection
      (LP: #1042692)
    - "Alt+Space" shortcut to reveal the window menu is not hardcoded, but a
       Compiz key option. " (Hold)" should also be translated. Made all
       Compiz plug-in names and all Compiz plug-in option names in
       unityshell.cpp static constants.
    - remove unity --reset, it's not anymore really needed now that we are
      in stable days of unity and we moved to gsettings
    - Removed the variables 'oldPrev' and 'oldNext' which got assigned the
      value NULL, but then were never used
    - Fixed the size of the previews to 770x380 pixels. (LP: #1045243)
    - UnityWindow: use smart pointers, use static close_icon (with dynamic
      state) and PanelStyle context (LP: #1033935) (LP: #1045127)
      (LP: #1046124) (LP: #1046126)
    - Remove everything in the #ifndef USE_MODERN_COMPIZ_GL ifdefs and remove
      the ifdefs alltogether. unity now requires compiz...

Read more...

Changed in unity (Ubuntu Quantal):
status: Confirmed → Fix Released
Changed in unity:
status: Fix Committed → Fix Released
Revision history for this message
martini (mr-owner-gmail) wrote :

I need this feature in Ubuntu 12.04 very much. Can somebody tell how to get it? Some updates, or backports?

Revision history for this message
Amr Ibrahim (amribrahim1987) wrote : Re: [Bug 876017] Re: [FFE][UIFE] Window management - We should be able to close windows in spread mode

On 08/10/12 11:19, martini wrote:
> I need this feature in Ubuntu 12.04 very much. Can somebody tell how to
> get it? Some updates, or backports?
>
Totally agree with you.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

One way to get this functionality (not like in Q, but with similar behavior), is enabling the plugin "Scale Addons" in CCSM and enable the option to close windows on middle-click.

Jeremy Bícha (jbicha)
no longer affects: ubuntu-docs (Ubuntu Quantal)
no longer affects: unity (Ubuntu Quantal)
Changed in ubuntu-docs (Ubuntu):
milestone: none → later
John Lea (johnlea)
Changed in ayatana-design:
status: Fix Committed → Fix Released
tags: added: reviewedbydesignq
removed: udp
Revision history for this message
Matthew (mh00h) wrote :

This feature showcases a bug: if 2 windows are spread, the unity bar covers the X on the left window making it impossible to close.

Revision history for this message
Matthew (mh00h) wrote :

Note that this is for Unity 6.12.0

Revision history for this message
thijs van severen (thijsvanseveren) wrote :

will this fix be backported to 12.04 ?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

No, sorry... It's not possible to backport features like this.

However you can still enable the scale-addons plugin in CCSM and enable the option to close a window by middle-clicking on it.

Revision history for this message
John Kim (kotux) wrote :

Lately, has there been any work on the documentation for this feature?

Changed in unity (Ubuntu):
assignee: nobody → lynda scheidt (lyndastill007)
Changed in ubuntu-docs (Ubuntu):
assignee: nobody → Chris Perry (clissold345)
status: Triaged → In Progress
Revision history for this message
Chris Perry (clissold345) wrote :

@Gunnar. I want to check with you what documentation changes are needed here. A close button was added to windows in spread mode. So I need to mention closing windows in spread mode using the mouse (of course a user can also close windows in spread mode using the keyboard - but I don't need to mention that?)?

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

@Chris: Is windows handling at this level of detail at all mentioned in the desktop guide? I can't recall it is, and if it isn't, I'd say that the ubuntu-docs task of this bug is invalid.

Revision history for this message
Chris Perry (clissold345) wrote :

I found two mentions of Super+W (see below). (I revised the second page two or three months ago.) But they both relate (mainly) to use of the keyboard. I could mention in shell-windows-switching.html "From the keyboard (method 2)" that the user can close a window using the mouse or the keyboard (and say of course how they do it)? I think that would be OK. Then we can mark the bug "Fix Committed"?

shell-keyboard-shortcuts.html
shell-windows-switching.html

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

That section is about *switching* between windows, and I don't see how this feature fits there. It would merely clutter the page IMO.

Let's just close the task. If there is a close button the users know that it can be used to close the window.

Changed in ubuntu-docs (Ubuntu):
assignee: Chris Perry (clissold345) → nobody
status: In Progress → Won't Fix
milestone: later → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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