app: detect fullscreen mode for macOS and Windows

When an application goes into or out of fullscreen mode,
Gio now emits a ConfigEvent with the current window mode.

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
Pierre Curto
2021-12-21 15:28:16 +01:00
committed by Elias Naur
parent 11bb86166a
commit 3a20330d82
4 changed files with 74 additions and 10 deletions
+8
View File
@@ -23,6 +23,14 @@ __attribute__ ((visibility ("hidden"))) CALayer *gio_layerFactory(void);
NSWindow *window = (NSWindow *)[notification object];
gio_onShow((__bridge CFTypeRef)window.contentView);
}
- (void)windowWillEnterFullScreen:(NSNotification *)notification {
NSWindow *window = (NSWindow *)[notification object];
gio_onFullscreen((__bridge CFTypeRef)window.contentView);
}
- (void)windowWillExitFullScreen:(NSNotification *)notification {
NSWindow *window = (NSWindow *)[notification object];
gio_onWindowed((__bridge CFTypeRef)window.contentView);
}
- (void)windowDidChangeScreen:(NSNotification *)notification {
NSWindow *window = (NSWindow *)[notification object];
CGDirectDisplayID dispID = [[[window screen] deviceDescription][@"NSScreenNumber"] unsignedIntValue];