Skip to content

Commit

Permalink
Mac OS X: Fixing fullscreen toggling on 10.4 (Carbon Qt)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Apr 2, 2012
1 parent 94fb07d commit 2f344c8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doomsday/engine/mac/src/displaymode_macx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <ApplicationServices/ApplicationServices.h>
#include <AppKit/AppKit.h>
#include <vector>
#include <QDebug>

#include "window.h"

Expand Down Expand Up @@ -191,9 +192,19 @@ void DisplayMode_Native_Raise(void* nativeHandle)
{
assert(nativeHandle);

#ifndef MACOS_10_4
// Qt uses the Cocoa framework.
NSView* handle = (NSView*) nativeHandle;
NSWindow* wnd = [handle window];
[wnd setLevel:CGShieldingWindowLevel()];
#else
// Qt uses the Carbon framework.
WindowRef* wnd = HIViewGetWindow((HIViewRef*) nativeHandle);
qWarning() << "wnd:" << wnd;
WindowGroupRef* wndGroup = GetWindowGroup(wnd);
qWarning() << "wndGroup:" << wndGroup;
SetWindowGroupLevel(wndGroup, CGShieldingWindowLevel());
#endif
}

void DisplayMode_Native_GetColorTransfer(displaycolortransfer_t* colors)
Expand Down

0 comments on commit 2f344c8

Please sign in to comment.