windowoverview: don't use dragaction in overview, close on button press

closing on button press will prevent the overview from closing when a close
button is pressed as the press event is consumed by the button, but not the
release event.
This commit is contained in:
Tom Beckmann 2015-03-11 13:59:57 +01:00
parent 5fa4764c98
commit e41d44d4e2
2 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ namespace Gala
public bool overview_mode { get; construct; }
DragDropAction drag_action;
DragDropAction? drag_action = null;
Clone? clone = null;
Actor prev_parent = null;
@ -453,7 +453,7 @@ namespace Gala
*/
void unmanaged ()
{
if (drag_action.dragging)
if (drag_action != null && drag_action.dragging)
drag_action.cancel ();
if (clone != null)

View File

@ -83,7 +83,7 @@ namespace Gala
close ();
}
public override bool button_release_event (Clutter.ButtonEvent event)
public override bool button_press_event (Clutter.ButtonEvent event)
{
if (event.button == 1)
close ();