FotoBox
fotoboxmac.mm
Go to the documentation of this file.
1
/* fotoboxmac.mm
2
*
3
* Copyright (c) 2019 Thomas Kais
4
*
5
* This file is subject to the terms and conditions defined in
6
* file 'COPYING', which is part of this source code package.
7
*/
8
#include "
fotobox.h
"
9
10
//Objective-C SDK
11
#import <AppKit/NSView.h>
12
#import <AppKit/NSWindow.h>
13
14
namespace
FotoBox
{
15
16
void
FotoBox::closeFullscreenWindowOnMac()
17
{
18
//WORKAROUND QTBUG-36714: closing a full screen QMainWindow leaves the screen black on macOS if there are multiple instances of QMainWindow created
19
const
auto
*view =
reinterpret_cast<
NSView *
>
(winId());
20
if
(view == nil) {
21
return
;
22
}
23
24
const
auto
*window = view.window;
25
if
(window == nil) {
26
return
;
27
}
28
29
//close the window again, using the native MacOS API
30
[window close];
31
}
32
33
}
// end namespace FotoBox
fotobox.h
FotoBox
Definition:
buzzer.cpp:74
source
fotoboxmac.mm
Generated on Fri Feb 10 2023 17:20:01 for FotoBox by
1.9.1