Merge lp://qastaging/~saviq/unity-2d/titlebar-dblclick into lp://qastaging/unity-2d

Proposed by Michał Sawicz
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 740
Merged at revision: 739
Proposed branch: lp://qastaging/~saviq/unity-2d/titlebar-dblclick
Merge into: lp://qastaging/unity-2d
Diff against target: 151 lines (+80/-0)
4 files modified
panel/applets/appname/appnameapplet.cpp (+41/-0)
panel/applets/appname/appnameapplet.h (+7/-0)
panel/applets/appname/windowhelper.cpp (+29/-0)
panel/applets/appname/windowhelper.h (+3/-0)
To merge this branch: bzr merge lp://qastaging/~saviq/unity-2d/titlebar-dblclick
Reviewer Review Type Date Requested Status
Alberto Mardegan (community) Approve
Łukasz Zemczak Approve
Gerry Boland (community) Approve
Ugo Riboni Pending
Review via email: mp+76759@code.qastaging.launchpad.net

Commit message

[panel] double click or drag titleBar to unmaximize

To post a comment you must log in.
Revision history for this message
Alberto Mardegan (mardy) wrote :

Great work, Michał!
The double click part seems to work quite reliably; however, I noticed a very strange behaviour with the dragging: if you drag the mouse cursor over the indicators (be it the applets, or the application menus) and then continue dragging down and immediately stop as soon as the window gets unmaximized, the mouse cursor remains in its "dragging" form, and all keyboard input seems to be disabled (for instance, you cannot switch desktop with Ctrl+Alt+Right) except for the ESC key, which brings the window back to the maximized mode.

Also, please adjust the coding style to put "*" and "&" next to the type name, and not next to the variable name.

review: Needs Fixing
Revision history for this message
Alberto Mardegan (mardy) wrote :

Sorry, the description of the way to trigger the bug is wrong: it has actually nothing to do on whether the cursor hovers the indicators, and can happen even if you simply drag it down just vertically.
It's rather hard to reproduce, actually.

Revision history for this message
Michał Sawicz (saviq) wrote :

I've just put this in a ppa (ppa:saviq/junk) but LP is slow to pick it up... so when you guys find the time to check it out, check in the PPA, and if it's not there just build it yourselves ;P

Revision history for this message
Michał Sawicz (saviq) wrote :

Make that ppa:saviq/stuff...

Revision history for this message
Gerry Boland (gerboland) wrote :

Hey Michał,
it does work nicely (with multimonitors too). I could not reproduce Alberto's bug.

Only little thing that bothered me:
- maximise window, then grab very top of titlebar and drag down. When it un-maximises, mouse is grabbing very bottom of the titlebar.
But really that's just me being pedantic.

review: Approve
Revision history for this message
Gerry Boland (gerboland) wrote :

Bug: Double right-click on maximised titlebar makes it un-maximise.

Question: should a right-click on maximised titlebar open the usual window-tools dropdown menu (Maximise, Minimise, Move...)?

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Works nicely here as well. I did some stress-tests and it still maximized/un-maximized correctly. Could not reproduce the bug mentioned by Alberto on my laptop as (Ubuntu 11.10) - both with a mouse and a touchpad. As for me - everything seems nice as it is.

review: Approve
Revision history for this message
Alberto Mardegan (mardy) wrote :

It may be that I have something wrong with my laptop touchpad; in a while I'll try with an external mouse, and see if it still happens.

Meanwhile, I found another issue: if you start gnome-terminal, when restoring the window via a doubleclick the window is restored to a geometry which is not the same used when restoring it via the titlebar restore button or by dragging the window out of the titlebar: the hight becomes much higher.

Curiously, this does not happen in gedit or firefox, so it's all rather suspicious.

Revision history for this message
Gerry Boland (gerboland) wrote :

I managed to reproduce Alberto's Terminal bug now too.

When I opened a Terminal window, maximised and unmaximised it 4 times, the 4th time the window geometry changes.

I could not reproduce this with the current unity-2d trunk (using max/unmax buttons).

gnome-terminal height has always behaved strangely for me. I tried other apps but they all work fine.

Revision history for this message
Michał Sawicz (saviq) wrote :

Dnia 2011-09-26, pon o godzinie 10:14 +0000, Gerry Boland pisze:
> When I opened a Terminal window, maximised and unmaximised it 4 times,
> the 4th time the window geometry changes.

I can't reproduce... I wonder how related is it to bug #822897 - I've
had the terminal behave that way, too.

@gerboland re: cursor position - that's not something we can control,
AFAIK. The WM receives an x/y coordinate of where the dragging started
and does its magic. It's probably related to decorations not being part
of the window or something.

Thanks for all the reviews!
--
Michał Sawicz <email address hidden>

738. By Michał Sawicz

[panel] follow style guidelines

739. By Michał Sawicz

[panel] missing indent

Revision history for this message
Alberto Mardegan (mardy) wrote :

Thanks Michał! I tried it now, and it works great.
Just one style issue again: check the indentation of line 126 in appnameapplet.h: it should be aligned with the first character after "(".

740. By Michał Sawicz

[panel] another style fix

Revision history for this message
Alberto Mardegan (mardy) wrote :

Damn, it's perfect! ;-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches