Frédéric Delanoy
66a95f6d45
winemac.drv: Use BOOL type where appropriate.
2013-09-30 20:35:02 +02:00
Ken Thomases
12e0b0577c
winemac: Activate an app if it sets focus on a window shortly after a hot key is pressed.
...
The Mac driver doesn't normally steal focus, but a press of a hot key counts
as the user giving permission.
2013-09-27 10:41:17 +02:00
Ken Thomases
6bae7cf796
winemac: Implement support for global hot keys.
...
Partially based on a patch for winex11 previously submitted by Vincent Povirk.
2013-09-27 10:41:05 +02:00
Ken Thomases
5a859655d7
winemac: Re-sync the window region whenever factors affecting its conversion to Cocoa coordinates change.
2013-09-27 10:39:22 +02:00
Ken Thomases
d7f4d67514
winemac: Fix hiding windows that are minimized using -close instead of -orderOut:.
...
Cocoa won't order a minimized window out of the screen list using -orderOut:.
This leaves a window that should be hidden still visible in the Dock, where
it can be unminimized.
2013-09-27 10:39:13 +02:00
Ken Thomases
4e0e9ca84a
winemac: When programmatically focusing a window, don't generate WINDOW_LOST_FOCUS event for previously focused window.
...
That event can confuse things if the program switches focus from A to B and
then back to A and then processes events. It will get an event saying that
A lost focus in Cocoa, check that A does indeed have current focus in Wine,
and so switch focus away from it (to the desktop window). (It then gets an
event that B lost focus, but that does nothing at that point.)
2013-09-26 20:05:41 +02:00
Michael Stefaniuc
3a13dc5995
winemac.drv: Avoid using CONST.
2013-09-24 12:58:00 +02:00
Ken Thomases
018d629b3c
winemac: Use NSMouseInRect() instead of NSPointInRect() to compensate for Cocoa's off-by-one coordinate system.
...
This matches what Cocoa does when determining how to handle an event so that,
for example, our test if a click is in the window grow box corresponds to
whether Cocoa will run an internal mouse-tracking loop to resize the window
when we pass it the event. This fixes a problem where both Cocoa and user32
would try to run a resize loop and the cursor would get "stuck" resizing the
window after the button was released.
2013-09-19 09:30:18 +02:00
Ken Thomases
4ad9d5f04a
winemac: Send WM_ENTER/EXITSIZEMOVE messages at start/end of a resizing operation.
2013-09-18 22:23:09 +02:00
Ken Thomases
d55d2ec85a
winemac: Move memory management of liveResizeDisplayTimer into property setter.
2013-09-18 22:23:09 +02:00
Ken Thomases
a3197b8ad0
winemac: At the start of a resize operation, get window min/max size info and pass it to Cocoa.
2013-09-18 22:23:09 +02:00
Ken Thomases
53036b6917
winemac: Trace the pixel format in DescribePixelFormat().
2013-09-12 11:08:23 +02:00
Ken Thomases
a300efc852
winemac: Return failure from DescribePixelFormat() for invalid pixel format.
...
Also use the proper function for checking the format and looking up the
internal format description.
2013-09-12 11:08:19 +02:00
Ken Thomases
d33a4da5ed
winemac: Restrict DescribePixelFormat() to displayable pixel formats.
2013-09-12 11:07:58 +02:00
Ken Thomases
ae2ce18fd6
winemac: Don't allow dead-key state to repeat after characters are generated.
...
It's fairly common in Mac keyboard layouts that, if you type a dead key twice,
the second key press will both produce a non-dead character and also
perpetuate the dead-key state. For example, with the U.S. layout, Option-E,
E will produce "" and Option-E, Option-E, E will produce "". Windows
keyboard layouts don't tend to do this. The second key press produces the
non-dead character and clears the dead-key state.
2013-09-10 11:07:41 +02:00
Ken Thomases
7ed00f6d97
winemac: Add support for mouse-move and right- and middle-click events on systray icons in the Mac status bar.
2013-09-06 11:59:13 +02:00
Ken Thomases
675b052572
winemac: When ordering sibling child windows, don't remove and re-add ones already in the right order.
2013-09-03 16:58:15 +02:00
Ken Thomases
987309e528
winemac: Don't use Cocoa parent-child relationship when topmost state is enough to keep owned in front of owner.
...
The Cocoa parent-child relationship has undesirable side effects and bugs. In
the general case, it's the only way to maintain the z-order of owned windows
relative to their owner. But when the owner is non-topmost and an owned
window is topmost, the Cocoa window level will enforce that and we don't
need it.
2013-09-03 16:58:15 +02:00
Ken Thomases
fad48773f6
winemac: A window is ineligible to be a Cocoa parent or child while minimized.
2013-08-30 11:18:38 +02:00
Ken Thomases
84903c5db3
winemac: Track latent child windows (the inverse of the latent parent window relationship).
...
This allows the relationship to be restored when the window becomes eligible
again.
2013-08-30 11:18:35 +02:00
Ken Thomases
a68d0a24ef
winemac: When a window becomes ineligible to be a parent, make the relationship latent in its children, too.
2013-08-30 11:18:30 +02:00
Ken Thomases
029bcf97dd
winemac: Clear latent parent on window close to break potential retain cycle.
2013-08-30 11:18:27 +02:00
Ken Thomases
512237ebe6
winemac: Consolidate the code for managing the Cocoa parent/child window relationship.
2013-08-30 11:18:23 +02:00
Ken Thomases
6873c3ee66
winemac: Make -setMacDrvParentWindow: do nothing if new parent is same as latent parent.
2013-08-30 11:18:18 +02:00
Ken Thomases
4b2f4eb600
winemac: Remove some duplicated code from -makeKeyAndOrderFront:.
2013-08-30 11:18:15 +02:00
Ken Thomases
315b39ec8d
winemac: Skip minimized windows when looking for z-ordering neighbor.
2013-08-30 11:18:11 +02:00
Ken Thomases
b550ee8d59
winemac: On click, don't reorder Cocoa child window after siblings of higher level.
...
It may be necessary to reorder to some extent because the clicked window is
behind a sibling at the same level, but that shouldn't move it later in the
list than higher-level siblings.
Cocoa gets buggy if the list of child windows isn't in z-order.
2013-08-30 11:18:07 +02:00
Ken Thomases
d14f787192
winemac: Don't reorder clicked window relative to sibling owned windows if it's in the right place.
...
The right place may not be the end of the list of Cocoa child windows if some
of the siblings are at a higher window level (i.e. floating if the clicked
window is not).
2013-08-30 11:17:56 +02:00
Ken Thomases
1b9fac3b3d
winemac: Don't generate scroll wheel events for axes with 0 delta.
2013-08-27 11:50:52 +02:00
Ken Thomases
b755674df3
winemac: Don't unminimize a window for SetFocus().
2013-08-27 11:50:52 +02:00
Charles Davis
a157c7bd81
winemac.drv: Support the public UTF-16 type for Unicode text.
2013-08-22 22:06:43 +02:00
Ken Thomases
251160fef9
winemac: Always trace arguments in macdrv_ShowWindow().
2013-08-21 12:13:56 +02:00
Ken Thomases
121eb08bae
winemac: Improve tracing in sync_window_position() to include adjusted frame.
2013-08-21 12:13:56 +02:00
Ken Thomases
d6624ee9f6
winemac: Remove a redundant memset of a struct.
2013-08-21 12:13:56 +02:00
Ken Thomases
20c3c80257
winemac: Create 1x1 Cocoa window with empty shape for zero-sized Win32 window.
2013-08-21 12:13:55 +02:00
Ken Thomases
87dd13150a
winemac: Make cgrect_from_rect() preserve origin of empty rectangles.
2013-08-21 12:13:55 +02:00
Charles Davis
8a041504c8
winemac.drv: Advertise some legacy WGL extensions in the GL_EXTENSIONS string.
2013-08-16 11:55:23 +02:00
Ken Thomases
4b24fce4e2
winemac: Avoid using display palette API, which was deprecated with the 10.7 SDK.
2013-08-15 16:17:49 +02:00
Ken Thomases
47337ed14c
winemac: Make a file-scope variable static.
2013-08-01 11:42:32 +02:00
Charles Davis
05a68dbc55
winemac.drv: Also return the number of pixel formats if the caller didn't supply a PIXELFORMATDESCRIPTOR.
2013-07-27 12:14:46 -05:00
Ken Thomases
a39b02c3e7
winemac: Dispatch key-up events directly to window to be sure to get them.
...
For keys pressed in combination with Command, -[NSApplication sendEvent:]
simply doesn't pass the key-up event through to the window. We have to
track which keys we've told Wine are pressed because Cocoa may consume
key-downs that trigger menus or system behaviors.
2013-07-09 10:30:45 +02:00
Ken Thomases
a723af61ac
Revert "winemac: Dispatch key events directly to window to be sure to get key-up events.".
...
This reverts commit 0d20ac02f7
.
2013-07-09 10:30:43 +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
Ken Thomases
967a49fcb2
winemac: Force swap interval to 0 for single-buffered contexts to avoid vsync'ed flushes.
2013-07-02 10:05:07 +02:00
Ken Thomases
d30705bdfe
winemac: Use screen color space for windows covered by OpenGL views.
2013-07-02 10:04:59 +02:00
Ken Thomases
941ce31adb
winemac: Fix ordering of windows owned by same owner when on inactive desktop space.
2013-06-28 11:40:55 +02:00
Ken Thomases
0d20ac02f7
winemac: Dispatch key events directly to window to be sure to get key-up events.
...
For keys pressed in combination with Command, -[NSApplication sendEvent:]
simply doesn't pass the key-up event through to the window.
2013-06-28 11:40:41 +02:00
Ken Thomases
3c7bc8202c
winemac: Avoid overdriving single-buffered GL if possible; the system throttles us.
...
Use glFlushRenderAPPLE(), if available, instead of glFlush() calls less
than 1/60th of a second since the last.
2013-06-21 11:57:42 +02:00