QT_BEGIN_NAMESPACE
+@interface QNSWindow : NSWindow {
+
+}
+
+@end
+
class QCocoaWindow : public QPlatformWindow
{
public:
protected:
void determineWindowClass();
- NSWindow *createWindow();
+ QNSWindow *createWindow();
NSRect globalGeometry(const QRect localWindowGeometry) const;
QRect windowGeometry() const;
QCocoaWindow *parentCocoaWindow() const;
+
private:
friend class QCocoaBackingStore;
- NSWindow *m_nsWindow;
+ QNSWindow *m_nsWindow;
QNSView *m_contentView;
NSView *m_windowSurfaceView;
quint32 m_windowAttributes;
#include <QDebug>
+@implementation QNSWindow
+
+- (BOOL)canBecomeKeyWindow
+{
+ return YES;
+}
+
+- (BOOL)canBecomeMainWindow
+{
+ return YES;
+}
+
+@end
+
QCocoaWindow::QCocoaWindow(QWindow *tlw)
: QPlatformWindow(tlw)
+ , m_windowAttributes(0)
+ , m_windowClass(0)
, m_glContext(0)
{
QCocoaAutoReleasePool pool;
/*
*/
-NSWindow * QCocoaWindow::createWindow()
+QNSWindow * QCocoaWindow::createWindow()
{
// Determine if we need to add in our "custom window" attribute. Cocoa is rather clever
// in deciding if we need the maximize button or not (i.e., it's resizeable, so you
*/
NSRect frame = globalGeometry(window()->geometry());
QCocoaAutoReleasePool pool;
- NSWindow *window;
+ QNSWindow *window;
switch (m_windowClass) {
case kMovableModalWindowClass: