mirror of
https://github.com/elementary/gala.git
synced 2024-12-26 02:33:27 +03:00
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:
parent
5fa4764c98
commit
e41d44d4e2
@ -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)
|
||||
|
@ -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 ();
|
||||
|
Loading…
Reference in New Issue
Block a user