mirror of
https://github.com/elementary/gala.git
synced 2024-11-24 12:23:58 +03:00
Bugfix #1007843
This commit is contained in:
parent
b65e75cccd
commit
feafb53f59
@ -46,10 +46,9 @@ namespace Gala
|
||||
public override void start ()
|
||||
{
|
||||
elements = Compositor.get_stage_for_screen (screen);
|
||||
Compositor.get_window_group_for_screen (screen).reparent (elements);
|
||||
Compositor.get_overlay_group_for_screen (screen).reparent (elements);
|
||||
clutter_actor_reparent (Compositor.get_window_group_for_screen (screen), elements);
|
||||
clutter_actor_reparent (Compositor.get_overlay_group_for_screen (screen), elements);
|
||||
Compositor.get_stage_for_screen (screen).add_child (elements);
|
||||
|
||||
screen.override_workspace_layout (ScreenCorner.TOPLEFT, false, 4, -1);
|
||||
|
||||
int width, height;
|
||||
@ -406,9 +405,9 @@ namespace Gala
|
||||
win.append (window);
|
||||
par.append (window.get_parent ());
|
||||
if ((window as WindowActor).get_workspace () == from) {
|
||||
window.reparent (out_group);
|
||||
clutter_actor_reparent (window, out_group);
|
||||
} else if ((window as WindowActor).get_workspace () == to) {
|
||||
window.reparent (in_group);
|
||||
clutter_actor_reparent (window, in_group);
|
||||
window.show_all ();
|
||||
}
|
||||
}
|
||||
@ -444,10 +443,10 @@ namespace Gala
|
||||
if ((window as WindowActor).is_destroyed ())
|
||||
continue;
|
||||
if (window.get_parent () == out_group) {
|
||||
window.reparent (par.nth_data (i));
|
||||
clutter_actor_reparent (window, par.nth_data (i));
|
||||
window.hide ();
|
||||
} else
|
||||
window.reparent (par.nth_data (i));
|
||||
clutter_actor_reparent (window, par.nth_data (i));
|
||||
}
|
||||
|
||||
win = null;
|
||||
@ -504,6 +503,18 @@ namespace Gala
|
||||
stdout.printf ("Gala %s\n", Gala.VERSION);
|
||||
Meta.exit (Meta.ExitCode.SUCCESS);
|
||||
}
|
||||
|
||||
void clutter_actor_reparent (Clutter.Actor actor, Clutter.Actor new_parent)
|
||||
{
|
||||
Clutter.Actor actor_tmp, old_parent;
|
||||
|
||||
if (actor == new_parent) return;
|
||||
actor_tmp = actor;
|
||||
|
||||
old_parent = actor.get_parent ();
|
||||
old_parent.remove_child (actor);
|
||||
new_parent.add_child (actor_tmp);
|
||||
}
|
||||
|
||||
[CCode (cname="clutter_x11_handle_event")]
|
||||
public extern int x_handle_event (X.Event xevent);
|
||||
|
Loading…
Reference in New Issue
Block a user