mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-14 20:28:26 +00:00
1c94bf396f
When this Retina mode is enabled and the primary display is in the user's default configuration, Wine gets told that screen and window sizes and mouse coordinates are twice what Cocoa reports them as in its virtual coordinate system ("points"). The Windows apps then renders at that high resolution and the Mac driver blits it to screen. If the screen is actually a Retina display in a high-DPI mode, then this extra detail will be preserved. Otherwise, the rendering will be downsampled and blurry. This is intended to be combined with increasing the Windows DPI, as via winecfg. If that is doubled to 192, then, in theory, graphical elements will remain the same visual size on screen but be rendered with finer detail. Unfortunately, many Windows programs don't correctly handle non-standard DPI so the results are not always perfect. The registry setting to enable Retina mode is: [HKEY_CURRENT_USER\Software\Wine\Mac Driver] "RetinaMode"="y" Note that this setting is not looked for in the AppDefaults\<exe name> key because it doesn't make sense for only some processes in a Wine session to see the high-resolution sizes and coordinates. Signed-off-by: Ken Thomases <ken@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
109 lines
2.8 KiB
Objective-C
109 lines
2.8 KiB
Objective-C
/*
|
|
* MACDRV Cocoa window declarations
|
|
*
|
|
* Copyright 2011, 2012, 2013 Ken Thomases for CodeWeavers Inc.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
*/
|
|
|
|
#import <AppKit/AppKit.h>
|
|
|
|
|
|
@class WineEventQueue;
|
|
|
|
|
|
@interface WineWindow : NSPanel <NSWindowDelegate>
|
|
{
|
|
BOOL disabled;
|
|
BOOL noActivate;
|
|
BOOL floating;
|
|
BOOL resizable;
|
|
BOOL maximized;
|
|
BOOL fullscreen;
|
|
BOOL pendingMinimize;
|
|
BOOL savedVisibleState;
|
|
WineWindow* latentParentWindow;
|
|
NSMutableArray* latentChildWindows;
|
|
|
|
void* hwnd;
|
|
WineEventQueue* queue;
|
|
|
|
void* surface;
|
|
pthread_mutex_t* surface_mutex;
|
|
|
|
CGDirectDisplayID _lastDisplayID;
|
|
NSTimeInterval _lastDisplayTime;
|
|
|
|
NSRect wineFrame;
|
|
NSRect roundedWineFrame;
|
|
|
|
NSBezierPath* shape;
|
|
NSData* shapeData;
|
|
BOOL shapeChangedSinceLastDraw;
|
|
|
|
BOOL colorKeyed;
|
|
CGFloat colorKeyRed, colorKeyGreen, colorKeyBlue;
|
|
|
|
BOOL usePerPixelAlpha;
|
|
|
|
NSUInteger lastModifierFlags;
|
|
|
|
NSRect frameAtResizeStart;
|
|
BOOL resizingFromLeft, resizingFromTop;
|
|
|
|
void* imeData;
|
|
BOOL commandDone;
|
|
|
|
NSSize savedContentMinSize;
|
|
NSSize savedContentMaxSize;
|
|
|
|
BOOL enteringFullScreen;
|
|
BOOL exitingFullScreen;
|
|
NSRect nonFullscreenFrame;
|
|
NSTimeInterval enteredFullScreenTime;
|
|
|
|
int draggingPhase;
|
|
NSPoint dragStartPosition;
|
|
NSPoint dragWindowStartPosition;
|
|
|
|
NSTimeInterval lastDockIconSnapshot;
|
|
|
|
BOOL ignore_windowDeminiaturize;
|
|
BOOL ignore_windowResize;
|
|
BOOL fakingClose;
|
|
}
|
|
|
|
@property (retain, readonly, nonatomic) WineEventQueue* queue;
|
|
@property (readonly, nonatomic) BOOL disabled;
|
|
@property (readonly, nonatomic) BOOL noActivate;
|
|
@property (readonly, nonatomic) BOOL floating;
|
|
@property (readonly, getter=isFullscreen, nonatomic) BOOL fullscreen;
|
|
@property (readonly, getter=isFakingClose, nonatomic) BOOL fakingClose;
|
|
@property (readonly, nonatomic) NSRect wine_fractionalFrame;
|
|
|
|
- (NSInteger) minimumLevelForActive:(BOOL)active;
|
|
- (void) updateFullscreen;
|
|
|
|
- (void) postKeyEvent:(NSEvent *)theEvent;
|
|
- (void) postBroughtForwardEvent;
|
|
|
|
- (WineWindow*) ancestorWineWindow;
|
|
|
|
- (void) updateForCursorClipping;
|
|
|
|
- (void) setRetinaMode:(int)mode;
|
|
|
|
@end
|