mirror of
https://github.com/elementary/gala.git
synced 2024-11-30 19:27:01 +03:00
Prevented warning when asking to acvivate newly mapped override-redirect window, made sure focused window after closing is a NORMAL one
This commit is contained in:
parent
68c8e3c6f0
commit
6f9c230781
@ -325,6 +325,7 @@ namespace Gala
|
|||||||
scale_x:1.0f, scale_y:1.0f, opacity:255)
|
scale_x:1.0f, scale_y:1.0f, opacity:255)
|
||||||
.completed.connect ( () => {
|
.completed.connect ( () => {
|
||||||
map_completed (actor);
|
map_completed (actor);
|
||||||
|
if (!actor.get_meta_window ().is_override_redirect ())
|
||||||
actor.get_meta_window ().activate (screen.get_display ().get_current_time ());
|
actor.get_meta_window ().activate (screen.get_display ().get_current_time ());
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@ -356,6 +357,9 @@ namespace Gala
|
|||||||
|
|
||||||
public override void destroy (WindowActor actor)
|
public override void destroy (WindowActor actor)
|
||||||
{
|
{
|
||||||
|
var screen = get_screen ();
|
||||||
|
var display = screen.get_display ();
|
||||||
|
|
||||||
switch (actor.get_meta_window ().window_type) {
|
switch (actor.get_meta_window ().window_type) {
|
||||||
case WindowType.NORMAL:
|
case WindowType.NORMAL:
|
||||||
actor.scale_gravity = Clutter.Gravity.CENTER;
|
actor.scale_gravity = Clutter.Gravity.CENTER;
|
||||||
@ -364,6 +368,14 @@ namespace Gala
|
|||||||
actor.animate (Clutter.AnimationMode.EASE_IN_QUAD, 200,
|
actor.animate (Clutter.AnimationMode.EASE_IN_QUAD, 200,
|
||||||
scale_x:0.95f, scale_y:0.95f, opacity:0, rotation_angle_x:15.0f)
|
scale_x:0.95f, scale_y:0.95f, opacity:0, rotation_angle_x:15.0f)
|
||||||
.completed.connect ( () => {
|
.completed.connect ( () => {
|
||||||
|
var focus = display.get_tab_current (Meta.TabList.NORMAL, screen, screen.get_active_workspace ());
|
||||||
|
// Only switch focus to the next window if none has grabbed it already
|
||||||
|
if (focus == null) {
|
||||||
|
focus = get_next_window (screen.get_active_workspace ());
|
||||||
|
if (focus != null)
|
||||||
|
focus.activate (display.get_current_time ());
|
||||||
|
}
|
||||||
|
|
||||||
destroy_completed (actor);
|
destroy_completed (actor);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user