Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #14 from metinkale38/master
Browse files Browse the repository at this point in the history
workaround for black bar when opening already maximized application #13
  • Loading branch information
luispabon committed Sep 28, 2016
2 parents fe1ecab + 3ca6998 commit dd68949
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,15 @@ function onWindowAdded(ws, win) {
// there is no further need to listen to maximize/unmaximize on the window.
if (USE_SET_HIDE_TITLEBAR) {
setHideTitlebar(win, true);

if(shouldBeUndecorated(win)){
win.unmaximize(Meta.MaximizeFlags.HORIZONTAL|Meta.MaximizeFlags.VERTICAL);
Mainloop.idle_add(function () {
win.maximize(Meta.MaximizeFlags.HORIZONTAL|Meta.MaximizeFlags.VERTICAL);
return false;
});
}

// set_hide_titlebar undecorates half maximized, so if we wish not to we
// will have to manually redo it ourselves
if (!settings.get_boolean(Prefs.UNDECORATE_HALF_MAXIMIZED_KEY)) {
Expand Down

0 comments on commit dd68949

Please sign in to comment.