mirror of
https://github.com/elementary/gala.git
synced 2024-11-28 04:05:22 +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,7 +325,8 @@ 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);
|
||||||
actor.get_meta_window ().activate (screen.get_display ().get_current_time ());
|
if (!actor.get_meta_window ().is_override_redirect ())
|
||||||
|
actor.get_meta_window ().activate (screen.get_display ().get_current_time ());
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case WindowType.MODAL_DIALOG:
|
case WindowType.MODAL_DIALOG:
|
||||||
@ -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;
|
||||||
@ -506,7 +518,7 @@ namespace Gala
|
|||||||
if (focus != null)
|
if (focus != null)
|
||||||
focus.activate (display.get_current_time ());
|
focus.activate (display.get_current_time ());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void unmaximize (Meta.WindowActor actor, int ex, int ey, int ew, int eh)
|
public override void unmaximize (Meta.WindowActor actor, int ex, int ey, int ew, int eh)
|
||||||
|
Loading…
Reference in New Issue
Block a user