Add modal window treatment to macOS#116
Conversation
|
clang-tidy review says "All clean, LGTM! 👍" |
| if (spec->floating()) { | ||
| self.level = NSFloatingWindowLevel; | ||
| self.hidesOnDeactivate = true; | ||
| if (spec->modal()) | ||
| [self setLevel:NSModalPanelWindowLevel]; | ||
| } |
There was a problem hiding this comment.
We're already setting the level property if it's floating, probably we can have a modal / not floating (this is not the case of Aseprite which sets the "floating" property for all non-main windows):
| if (spec->floating()) { | |
| self.level = NSFloatingWindowLevel; | |
| self.hidesOnDeactivate = true; | |
| if (spec->modal()) | |
| [self setLevel:NSModalPanelWindowLevel]; | |
| } | |
| if (spec->floating()) { | |
| self.level = NSFloatingWindowLevel; | |
| self.hidesOnDeactivate = true; | |
| } | |
| if (spec->modal()) | |
| self.level = NSModalPanelWindowLevel; |
69bd5cc to
7ea68e2
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
| } | ||
|
|
||
| if (spec->modal()) | ||
| [self setLevel:NSModalPanelWindowLevel]; |
There was a problem hiding this comment.
| [self setLevel:NSModalPanelWindowLevel]; | |
| self.level = NSModalPanelWindowLevel; |
Before this addition, when a modal window was active, it was allowed to bring other windows to the front (which should be prohibited). This addition is part of the solution for the issue aseprite/aseprite#4561 'Inactive windows in multiple-window UI mode pass events to below windows'
7ea68e2 to
8840009
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
|
I'll merge this, it would be nice to block the whole hierarchy of parent's floating windows when a modal is displayed, but at the moment this works better than the current |
Great! Remember to approve aseprite/aseprite#4835 so that issue aseprite/aseprite#4561 is resolved in Aseprite. |
This fix is the first step to solve issue aseprite/aseprite#4561