mirror of
https://github.com/elementary/gala.git
synced 2024-09-11 15:15:39 +03:00
Tile switching fix for position only changes (#387)
Looks like the size_change isn't called when switching directly between tile positions using the keyboard. Because the size isn't changed, but position_changed is emitted.
This commit is contained in:
parent
df0022c4b8
commit
dca99e0c0b
@ -967,9 +967,18 @@ namespace Gala
|
||||
return;
|
||||
}
|
||||
|
||||
ulong signal_id = 0U;
|
||||
signal_id = window.size_changed.connect (() => {
|
||||
window.disconnect (signal_id);
|
||||
ulong size_signal_id = 0U;
|
||||
ulong position_signal_id = 0U;
|
||||
size_signal_id = window.size_changed.connect (() => window_change_complete (actor, which_change, size_signal_id, position_signal_id));
|
||||
position_signal_id = window.position_changed.connect (() => window_change_complete (actor, which_change, size_signal_id, position_signal_id));
|
||||
}
|
||||
|
||||
void window_change_complete (Meta.WindowActor actor, Meta.SizeChange which_change, ulong size_signal_id, ulong position_signal_id) {
|
||||
unowned Meta.Window window = actor.get_meta_window ();
|
||||
|
||||
window.disconnect (size_signal_id);
|
||||
window.disconnect (position_signal_id);
|
||||
|
||||
var new_rect = window.get_frame_rect ();
|
||||
|
||||
switch (which_change) {
|
||||
@ -981,12 +990,11 @@ namespace Gala
|
||||
break;
|
||||
case Meta.SizeChange.FULLSCREEN:
|
||||
case Meta.SizeChange.UNFULLSCREEN:
|
||||
handle_fullscreen_window (actor.get_meta_window (), which_change);
|
||||
handle_fullscreen_window (window, which_change);
|
||||
break;
|
||||
}
|
||||
|
||||
size_change_completed (actor);
|
||||
});
|
||||
}
|
||||
|
||||
public override void minimize (WindowActor actor)
|
||||
|
Loading…
Reference in New Issue
Block a user