Commit Graph

36 Commits

Author SHA1 Message Date
Ken Thomases fa573553bc winemac: Run a single clipboard manager thread per window station, inside the explorer process.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-24 11:10:10 +02:00
Jacek Caban 8f0557940a winemac.drv: Added ThreadDetach entry point and use it instead of DllMain.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-27 13:24:06 +09:00
Ken Thomases 1c94bf396f winemac: Add support for a high-resolution ("Retina") rendering mode.
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>
2016-05-06 11:45:24 +09:00
Ken Thomases d8deecab11 winemac: Enable localization of strings used to build Mac menus.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-17 22:56:39 +09:00
Ken Thomases 47708c2635 winemac: Add a new registry setting, OpenGLSurfaceMode, to control how GL surfaces relate to the window.
The default behavior is that GL surfaces are on top of all non-GL content in
the window.  This maximizes the performance for the common case of games, but
clipping by parents, siblings, and child windows isn't respected.

Setting OpenGLSurfaceMode to "behind" pushes the GL surface to be behind the
Mac window.  The window has transparent holes punched through it so that the GL
surface shows through.  USER32 and the wineserver take care of making sure the
holes are only where the GL windows would be unclipped and unoccluded.  Because
the OS X window server has to composite the GL surface with the window, this
limits the framerate.

Since the Mac driver has no server-side rendering path, GDI rendering to a
window which has a GL surface doesn't work.  As a partial workaround, mostly
for cases where a GL surface is created but never used, setting
OpenGLSurfaceMode to "transparent" allows the GDI rendering to show through the
transparent parts of the GL surface.  The GDI rendering is drawn to the
top-level window's surface as normal.  (The behavior of user32 to exclude the
portion covered by a GL window from GDI rendering is disabled.)  The GL surface
is in front of the window but potentially wholly or partially transparent.  It
is composited with the window behind it.

The GL surface is initially cleared to be completely transparent.  So, if
no GL rendering is done, the window will appear as though the GL surface didn't
exist.
2015-09-15 16:59:03 +09:00
Ken Thomases 451915100a winemac: Add the ability to disable high-resolution scrolling.
The Mac driver can generate scroll wheel events with values which are not integral
multiples of WHEEL_DELTA.  Apps should handle that by scrolling a corresponding
non-integral multiple of what they'd do for a WHEEL_DELTA-valued scroll or, if
they can't, then at least accumulate scroll distance until its magnitude exceeds
WHEEL_DELTA and do a "chunky" scroll.  However, many apps don't do that properly.
They may scroll way too far/fast or even in the opposite direction.

If the registry setting UsePreciseScrolling is set to "n", the Mac driver will do
that accumulation and chunking itself to work around such broken app behavior.
2014-05-15 11:28:52 +02:00
Ken Thomases ef4677106a winemac: Disable moving or resizing windows when cursor clipping is in effect.
Many games clip the cursor to the client area of the window.  However, on OS X,
the resizing controls extend into that client area.  So, it's possible that
while playing, the user might unintentionally click in the resizing area and
drag, resizing the window.
2014-04-29 11:22:58 +02:00
Ken Thomases 8876751e93 winemac: Prevent disabled windows from being moved.
This won't be enforced if AllowImmovableWindows=n is set in the registry.
2013-12-30 19:01:48 +01:00
Ken Thomases 788e2034f6 winemac: Add support for a "Decorated" registry setting to control whether windows get Mac-style decorations. 2013-11-22 13:57:28 +01:00
Huw Davies 22008f7fd9 winemac: Update the thread's active_keyboard_layout on keyboard change. 2013-11-20 19:39:01 +01:00
Alexandre Julliard e4a43cfa1f winemac: Don't try to set the app icon before GDI is properly initialized. 2013-10-24 19:00:10 +02:00
Ken Thomases 742c48b348 winemac: Disable software GL rendering unless it's enabled via a new registry setting, AllowSoftwareRendering. 2013-10-22 16:37:40 +02:00
Alexandre Julliard 5435dad997 winemac: Only register the IME class when needed. 2013-10-21 14:46:25 +02:00
Alexandre Julliard 6ae1e33a17 winemac: Clear the thread data explicitly on detach. 2013-10-16 20:49:24 +02:00
Ken Thomases 79d45585bc winemac: Add registry settings to make Option keys send Alt rather than accessing additional characters from the keyboard layout. 2013-10-10 10:45:22 +02:00
Ken Thomases 4f23821f08 winemac: Add registry setting to control setting display gamma ramp. 2013-07-09 10:28:43 +02:00
Ken Thomases 9e878cb92c winemac: Add registry setting to disable vertical sync. 2013-07-02 10:07:57 +02:00
Ken Thomases b7c7d09470 winemac: Add registry setting to control glFlush() skipping for single-buffer contexts and disable it by default. 2013-07-02 10:05:35 +02:00
Alexandre Julliard 410b728c7b winemac.drv: Don't register IME classes before the dll is initialized. 2013-06-20 22:14:35 +02:00
Ken Thomases 220b8b7946 winemac: Add an option to capture the displays for full-screen windows in addition to display mode changes.
Under HKCU\Software\Wine\Mac Driver, set string value
CaptureDisplaysForFullscreen to "y" to enable the new behavior.
2013-06-07 11:57:06 +02:00
Ken Thomases c3d2e43060 winemac: By default, make full-screen windows not float when not the active app.
Added a registry setting to control the behavior: WindowsFloatWhenInactive
with possible values "none", "all, and "nonfullscreen" which is the default.
2013-05-29 19:49:40 +02:00
Ken Thomases 3964f805cc winemac: Change some run-time asserts to compile-time. 2013-05-06 11:37:44 +02:00
Ken Thomases 192b8dbf9d winemac: Implement an IME that uses the OS X input methods.
Developed with Aric Stewart.
2013-04-22 12:37:50 +02:00
C.W. Betts 95daa45dbc winemac: Implement getting and setting screen saver state on OS X. 2013-03-29 17:52:17 +01:00
Ken Thomases b1de532393 winemac: Set application Dock icon from first icon resource in process's .exe file. 2013-03-25 14:01:04 +01:00
Ken Thomases 69e631e04e winemac: Add support for "query" events which wait for synchronous responses. 2013-03-11 10:53:32 +01:00
Ken Thomases 6b2b3e69f7 winemac: Implement CountClipboardFormats() with support for text formats. 2013-03-11 10:52:59 +01:00
Ken Thomases c76f0beeab winemac: Fail gracefully and early when run from a non-GUI session. 2013-03-05 09:50:02 +01:00
Ken Thomases a49df4b317 winemac: Implement SetCursor() and DestroyCursorIcon(). 2013-02-25 10:40:37 +01:00
Ken Thomases b78eee3172 winemac: Build a map from Mac virtual key codes to Win32 vkeys and scan codes based on Mac keyboard layout. 2013-02-05 11:06:02 +01:00
Ken Thomases a22be47fcf winemac: Add infrastructure to convert from Cocoa event time to Wine tick count. 2013-01-28 14:02:08 +01:00
Ken Thomases ed367c504d winemac: Implement a WINDOW_CLOSE_REQUESTED event to allow closing windows. 2013-01-21 12:51:19 +01:00
Ken Thomases 207c4d193f winemac: Associate an event queue with each thread that creates windows and with each window. 2013-01-21 12:51:17 +01:00
Ken Thomases b6d902ee46 winemac: Add a simple ERR() logging macro that can be used from Cocoa code. 2013-01-21 12:51:16 +01:00
Ken Thomases 35319684d3 winemac: Convert main thread to Cocoa main loop on process attach. 2013-01-09 17:39:37 +01:00
Ken Thomases 35033025aa winequartz.drv: Rename to winemac.drv ("the Mac driver"). 2012-12-17 20:31:14 +01:00