mirror of
https://github.com/elementary/gala.git
synced 2024-10-05 19:27:25 +03:00
pip: Place the window in screen on click
Show the PiP window when is off screen and the users clicks on it.
This commit is contained in:
parent
143eb26d20
commit
c99a1d00e7
@ -388,6 +388,8 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
|
||||
}
|
||||
|
||||
private void place_window_in_screen () {
|
||||
off_screen = false;
|
||||
|
||||
Meta.Rectangle monitor_rect;
|
||||
get_current_monitor_rect (out monitor_rect);
|
||||
|
||||
@ -515,7 +517,11 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
|
||||
}
|
||||
|
||||
private void activate () {
|
||||
var window = window_actor.get_meta_window ();
|
||||
window.activate (Clutter.get_current_event_time ());
|
||||
if (off_screen) {
|
||||
place_window_in_screen ();
|
||||
} else {
|
||||
var window = window_actor.get_meta_window ();
|
||||
window.activate (Clutter.get_current_event_time ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user