Skip to content

Commit

Permalink
ecere/gui: (#992) Fix for coming back from fullscreen on Cinnamon
Browse files Browse the repository at this point in the history
- (occasional wrong stacking of windows)
  • Loading branch information
jerstlouis committed Feb 15, 2014
1 parent 209da66 commit be0f302
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ecere/src/gui/GuiApplication.ec
Expand Up @@ -411,12 +411,26 @@ public class GuiApplication : Application

// Maximized native decorations windows suffer when we drag the dock around, so remaximize them
// It's a little jumpy, but oh well.

// Made this Windows only as it was causing occasional wrong stacking of windows in X11/Cinnamon
// when switching debugged app from full-screen

for(child = desktop.children.first; child; child = child.next)
{
if(child.nativeDecorations && child.rootWindow == child && child.state == maximized)
{
#if defined(__WIN32__)
child.state = normal;
child.state = maximized;
#else
if(child.active)
{
child.state = normal;
child.state = maximized;
}
else
child.requireRemaximize = true;
#endif
}
}
/*for(child = desktop.children.first; child; child = child.next)
Expand Down
10 changes: 10 additions & 0 deletions ecere/src/gui/Window.ec
Expand Up @@ -3458,6 +3458,15 @@ private:
if(rootWindow == this)
Log(active ? "active\n" : "inactive\n");
*/
if(active && requireRemaximize)
{
if(state == maximized)
{
property::state = normal;
property::state = maximized;
}
requireRemaximize = false;
}

// Testing this here...
if(!parent || parent == guiApp.desktop || parent.active)
Expand Down Expand Up @@ -9571,6 +9580,7 @@ private:
bool nativeDecorations:1;
bool manageDisplay:1;
bool formDesigner:1; // True if we this is running in the form editor
bool requireRemaximize:1;
};

// Checks used internally for them not to take effect in FormDesigner
Expand Down

0 comments on commit be0f302

Please sign in to comment.