Skip to content

Commit

Permalink
delay window remaximazition after toggling titlebar
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgarmehmetali committed Apr 2, 2017
1 parent abe251d commit d4bc04d
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/TitleBarManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,19 @@ public class TitleBarManager : Object {
out child_pid);

ChildWatch.add (child_pid, (pid, status) => {
if(window.is_maximized()) {
window.unmaximize();
window.maximize();
}
if(window.is_maximized_horizontally()) {
window.unmaximize_horizontally();
window.maximize_horizontally();
}
if(window.is_maximized_vertically()) {
window.unmaximize_vertically();
window.maximize_vertically();
}
Timeout.add(30, () => {
if(window.is_maximized()) {
window.unmaximize();
window.maximize();
} else if(window.is_maximized_horizontally()) {
window.unmaximize_horizontally();
window.maximize_horizontally();
} else if(window.is_maximized_vertically()) {
window.unmaximize_vertically();
window.maximize_vertically();
}
return false;
});
Process.close_pid (pid);
});
} catch(SpawnError e){
Expand Down

0 comments on commit d4bc04d

Please sign in to comment.