mirror of
https://github.com/elementary/gala.git
synced 2024-11-26 23:05:09 +03:00
Simplify
This commit is contained in:
parent
08b2930c52
commit
38eddf28ea
@ -224,7 +224,7 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
|
|||||||
|
|
||||||
#if HAS_MUTTER42
|
#if HAS_MUTTER42
|
||||||
grab = resize_button.get_stage ().grab (resize_button);
|
grab = resize_button.get_stage ().grab (resize_button);
|
||||||
resize_button.event.connect (on_resize_button_event);
|
resize_button.event.connect (on_resize_event);
|
||||||
#else
|
#else
|
||||||
resize_button.get_stage ().set_motion_events_enabled (false);
|
resize_button.get_stage ().set_motion_events_enabled (false);
|
||||||
resize_button.get_stage ().captured_event.connect (on_resize_event);
|
resize_button.get_stage ().captured_event.connect (on_resize_event);
|
||||||
@ -233,11 +233,7 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAS_MUTTER42
|
|
||||||
private bool on_resize_button_event (Clutter.Event event) {
|
|
||||||
#else
|
|
||||||
private bool on_resize_event (Clutter.Event event) {
|
private bool on_resize_event (Clutter.Event event) {
|
||||||
#endif
|
|
||||||
if (!resizing) {
|
if (!resizing) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -288,7 +284,7 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
|
|||||||
#if HAS_MUTTER42
|
#if HAS_MUTTER42
|
||||||
if (grab != null) {
|
if (grab != null) {
|
||||||
grab.dismiss ();
|
grab.dismiss ();
|
||||||
resize_button.event.disconnect (on_resize_button_event);
|
resize_button.event.disconnect (on_resize_event);
|
||||||
grab = null;
|
grab = null;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user