[gnome-boxes/gnome-3-4] Fix dragging window in win7 shouldn't bring topbar



commit b19f01c9702e21cbd377c49b87c3c1d17ef31a5c
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Thu Apr 19 04:52:22 2012 +0200

    Fix dragging window in win7 shouldn't bring topbar
    
    Win7 (and perhaps Vista), have that window management ui that allows to
    maximize a window by dragging it to the top of the screen and releasing (when
    there is a blue overlay over the desktop). The window will then be maximzed.
    
    Currently, with Boxes, this is very hard to work with, Since the toolbar will
    be bring up when reaching the top, and will catch the release event. Since it's
    along the whole width of the screen there is no way to avoid the toolbar and
    use that feature.
    
    I think a reasonable solution would be to not bring the topbar when the button
    has been pressed (another solution could be to send the release event to the
    guest if it received the press event before the toolbar, but this is confusing
    imho)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=674361

 src/display-page.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/display-page.vala b/src/display-page.vala
index b6f776f..52474fa 100644
--- a/src/display-page.vala
+++ b/src/display-page.vala
@@ -87,7 +87,8 @@ private class Boxes.DisplayPage: GLib.Object {
 
                 if (y == 0) {
                     toolbar_event_stop ();
-                    set_overlay_toolbar_visible (true);
+                    if (event.motion.state == 0)
+                        set_overlay_toolbar_visible (true);
                 } else if (y > 5 && toolbar_hide_id == 0) {
                     toolbar_event_stop ();
                     toolbar_hide_id = Timeout.add (app.duration, () => {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]