Ken Thomases
3a03dcf097
winemac: Avoid moving owned windows when programmatically moving the owner.
...
Cocoa normally maintains the relative position of owned windows with respect
to the owner, which differs from Windows.
2013-11-15 12:00:12 +01:00
Ken Thomases
784a91390e
winemac: Allow ordering a window into Cocoa's window list even if it's positioned outside of the desktop.
...
Some programs minimize windows which are outside of the desktop. The Mac
driver had been leaving such windows ordered out, which prevented them from
minimizing and appearing on the Dock. That, in turn, made it difficult for
the user to restore them.
2013-11-15 11:59:47 +01:00
Ken Thomases
83f6470c0e
winemac: Convert the QUERY_RESIZE_END query to an event, WINDOW_RESIZE_ENDED.
...
Queries can be run out of order because the main thread is waiting on the
response. The main thread didn't really need a response from QUERY_RESIZE_END.
It was only a query for symmetry with QUERY_RESIZE_START.
2013-11-01 10:51:23 +01:00
Ken Thomases
de3fb34af7
winemac: Send WM_{ENTER, EXIT}SIZEMOVE around window frame changes initiated by Cocoa.
...
The Mac driver was already sending these events when the user resizes the
window by dragging its corner/edges, but there are other occasions when the
window frame changes. For example, when the user zooms the window.
2013-11-01 10:51:11 +01:00
Ken Thomases
b11d6850f2
winemac: Tell Cocoa that we don't draw a focus ring for our views.
...
This seems to eliminate a lot of house-keeping work inside Cocoa.
2013-11-01 10:51:01 +01:00
Kevin Eaves
771fcd894a
winemac: Restore the window title when the window style is changed.
2013-10-17 20:29:25 +02:00
Ken Thomases
f4f50c9e4a
winemac: Implement support for Cocoa-style full-screen mode.
...
Based in large part on a patch submitted by Kevin Eaves.
2013-10-11 11:04:53 +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
05e3d0e5cc
winemac: Make sure the same housekeeping is done when closing a window as is done when hiding it.
2013-10-10 10:45:13 +02:00
Ken Thomases
c043587d56
winemac: Tell Wine when Cocoa has brought a window to the front.
2013-10-08 15:39:01 +02:00
Ken Thomases
4d9340eb41
winemac: Update the window min/max size info and enforce it when zooming.
2013-10-08 15:39:01 +02:00
Ken Thomases
bdcb8138fe
winemac: Don't accidentally clear Cocoa window style mask bits.
2013-10-08 15:39:01 +02:00
Ken Thomases
dd59ab26fe
winemac: Only update window minimized state when it has changed from what processed events told us it was.
...
This fixes a problem where windows could spontaneously re-minimize after
being unminimized. Cocoa would see the window unminimize. It would queue
a WINDOW_DID_UNMINIMIZE event. While that event was pending, Wine might do
something which caused set_cocoa_window_properties() to be called and tell
Cocoa to conform itself to the current Win32 state. The current Win32 state
still had the window minimized, so Cocoa would re-minimize the window. It
would even discard the WINDOW_DID_UNMINIMIZE event.
2013-10-08 15:39:01 +02:00
Ken Thomases
54291ad3d1
winemac: Let Wine always drive window minimization; Cocoa just requests it.
2013-09-30 20:36:34 +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
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
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
b755674df3
winemac: Don't unminimize a window for SetFocus().
2013-08-27 11:50:52 +02: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
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
1d10457aee
winemac: Also activate if a window is ordered front shortly after tray icon clicked.
...
... in addition to if one is focused.
2013-06-20 11:30:16 +02:00
Ken Thomases
f035cc73d0
winemac: Don't give windows focus on click if the click was sent to Wine.
...
Only clicks on the title bar (outside the close or minimize buttons) or the
grow box give windows focus.
2013-06-18 12:57:44 +02:00
Ken Thomases
3faf1a92b0
winemac: Don't bring disabled or no-activate windows forward when clicked.
2013-06-18 12:57:43 +02:00
Ken Thomases
f6924b9603
winemac: Honor requests to order owned windows relative to other owned windows of the same owner.
2013-06-07 11:58:59 +02:00
Ken Thomases
b96b565514
winemac: Command-clicks shouldn't give windows focus.
2013-06-07 11:58:52 +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
a6dc4906de
winemac: Ignore window frame changes while minimized but check again when unminimized.
2013-06-04 15:01:15 +02:00
Ken Thomases
62a1907c9e
winemac: Make windows key after unminimizing, if allowed.
...
We generally prevent Cocoa from making our windows key (focused) so that
Wine can be in control. However, after unminimizing, Wine believes the
window is already focused but Cocoa doesn't, so key presses just cause beeps.
2013-06-04 15:01:12 +02:00
Ken Thomases
b285c5706e
winemac: Defer minimizing hidden windows until they are shown.
...
Minimizing invisible windows causes weird phantoms to appear in
Exposé, the Window menu, and the Dock.
2013-06-04 15:00:54 +02:00
Ken Thomases
841f158d81
winemac: Don't accidentally unminimize a window when trying to change z-order.
2013-06-04 15:00:31 +02:00
Aric Stewart
c6d307533b
macdrv: Rework the way we handle cursor position and composition text.
2013-05-30 20:19:34 +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
c8d4b1cc5e
winemac: Order front in -makeKeyAndOrderFront:; we only override to control key status.
...
When we have windows on two different spaces and the user switches between them by
clicking our Dock icon, Cocoa inexplicably sends the switched-to window to the
back of the z-order. It's only -makeKeyAndOrderFront: that brings it forward
again, but our override broke that.
2013-05-17 16:36:40 +02:00
Ken Thomases
ef874a8eaa
winemac: Don't reorder windows if they're already ordered as requested.
...
This avoids adjusting window levels. It also avoid unnecessarily deinterleaving
the windows of this and other processes.
2013-05-17 16:36:35 +02:00
Ken Thomases
7a047af640
winemac: In -setFrameIfOnScreen:, don't adjust window levels if fullscreen-ness didn't change.
2013-05-17 16:36:31 +02:00
Ken Thomases
94746f1d2d
winemac: In -setFrameIfOnScreen:, avoid some work if the frame didn't change.
2013-05-17 16:36:28 +02:00
Ken Thomases
27510fae8e
winemac: Centralize adjusting of window levels using the window server's z-order.
2013-05-17 16:36:24 +02:00
Ken Thomases
8343e7ce4d
winemac: Set up window's latent parent-child relationship before ordering the window.
...
Making a window a child reorders it to be immediately above or below its parent,
potentially undoing the ordering we had just done.
2013-05-17 16:36:00 +02:00
Ken Thomases
6d4098ebd3
winemac: Consider minimized windows as "on screen" for our purposes.
2013-05-17 16:35:48 +02:00
Ken Thomases
c3183fc007
winemac: Implement simpler way to find front Wine window.
...
This uses Cocoa and the window server to track windows and their z-order,
which is more reliable than our own tracking.
2013-05-17 16:35:27 +02:00
Ken Thomases
05c250dfcb
winemac: Always call super in -validateMenuItem:; fixes check mark in Windows menu.
2013-05-17 12:15:22 +02:00
Ken Thomases
939d9a906f
winemac: Improve positioning of input method candidate window.
2013-05-17 12:14:51 +02:00
Ken Thomases
1ac1cd69ad
winemac: Fix disabling of resizable windows.
2013-05-14 17:28:30 +02:00
Ken Thomases
d9ae2f3e38
winemac: Consolidate scroll wheel handling into -[WineApplicationController handleScrollWheel:].
2013-05-07 11:19:33 +02:00
Ken Thomases
e15b82ad1b
winemac: Consolidate mouse button handling into -[WineApplicationController handleMouseButton:].
2013-05-07 11:19:27 +02:00
Ken Thomases
72e893237c
winemac: Consolidate mouse move handling into -[WineApplicationController handleMouseMove:].
2013-05-07 11:19:21 +02:00
Ken Thomases
1c7a2ba33b
winemac: If an app opens a window shortly after its systray icon is clicked, activate it.
...
The Mac driver doesn't normally steal focus, but a click on the systray icon
counts as the user giving permission.
2013-04-25 11:44:42 +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
Ken Thomases
e7d5f329e5
winemac: Refactor WineApplication class to separate most logic into a controller class.
2013-04-16 12:10:36 +02:00
Ken Thomases
2e226b9ad8
winemac: Don't order the window on-screen in -[WineWindow adjustWindowLevel].
2013-04-11 12:06:41 +02:00
Ken Thomases
f37153ac7d
winemac: Initialize window surface to Mac-standard window background color instead of black.
2013-04-05 11:57:13 +02:00
Ken Thomases
26a74c664d
winemac: Tell Cocoa to preserve our window content during live resizing.
2013-04-05 11:56:32 +02:00
Ken Thomases
1ee93853c2
winemac: Make macdrv_event structs heap-allocated and reference-counted.
2013-04-04 12:14:33 +02:00
Ken Thomases
94dc91a45d
winemac: During live resize, force occasional redisplay due to spontaneous redrawing.
2013-04-02 12:47:27 +02:00
Ken Thomases
a767ee99fa
winemac: Track drawn surface region to reduce black flicker for new or resized windows.
2013-03-29 17:17:22 +01:00
Ken Thomases
0e8b305023
winemac: Draw surface region rects separately instead of clipping one big draw.
2013-03-29 17:17:22 +01:00
Ken Thomases
f7406e74ae
winemac: Invalidate window shadow on every draw for transparent windows.
2013-03-29 17:17:22 +01:00
Ken Thomases
7993bd3d90
winemac: Implement support for drag-and-drop.
2013-03-14 12:03:32 +01:00
Ken Thomases
449e2655c2
winemac: Add support for delay-rendered (a.k.a. promised) clipboard data.
2013-03-11 10:53:38 +01:00
Ken Thomases
3f3ee6393d
winemac: Implement OpenGL support.
2013-03-06 12:56:12 +01:00
Ken Thomases
9b0fdc645f
winemac: Implement ClipCursor().
2013-02-25 10:40:39 +01:00
Ken Thomases
5d8e685297
winemac: Request mouse move events when our window is active even when cursor is outside it.
2013-02-25 10:40:38 +01:00
Ken Thomases
0a56ef356a
winemac: Handle mouse moves in -[WineApplication sendEvent:] instead of WineWindow.
2013-02-25 10:40:38 +01:00
Ken Thomases
d26a6bf451
winemac: Implement ChangeDisplaySettingsEx().
2013-02-18 10:35:46 +01:00
Ken Thomases
be6af9a169
winemac: Implement support for full-screen windows.
2013-02-18 10:34:46 +01:00
Ken Thomases
ba86e67792
winemac: Track Cocoa windows in a z-ordered list.
2013-02-18 10:34:40 +01:00
Ken Thomases
d74e90080a
winemac: Don't set Cocoa window frame to be zero-sized.
2013-02-18 10:34:29 +01:00
Ken Thomases
47352930d8
winemac: Discard old frame changed events when setting frame for off-screen windows, too.
2013-02-18 10:34:24 +01:00
Ken Thomases
a472d39b7d
winemac: Prevent Cocoa from consuming certain key-down events.
2013-02-11 11:46:11 +01:00
Ken Thomases
3748c39308
winemac: Implement MOUSE_SCROLL events.
2013-02-11 11:46:10 +01:00
Ken Thomases
033fe9a7c2
winemac: Process clicks in an inactive window in addition to activating it.
2013-02-07 12:04:51 +01:00
Ken Thomases
572324bae3
winemac: Implement MOUSE_MOVED(_ABSOLUTE) events.
2013-02-07 12:04:49 +01:00
Ken Thomases
0757a66360
winemac: Ignore Cocoa's window frame adjustments for off-screen windows.
2013-02-05 11:11:45 +01:00
Ken Thomases
77de57683f
winemac: Generate KEY_PRESS/RELEASE events from Cocoa key events.
2013-02-05 11:06:43 +01:00
Ken Thomases
8a0c8d9264
winemac: Implement support for minimizing windows.
2013-02-05 11:05:23 +01:00
Ken Thomases
3c5973139f
winemac: Implement a WINDOW_LOST_FOCUS event.
2013-01-28 14:03:45 +01:00
Ken Thomases
7863a230ec
winemac: Implement a WINDOW_GOT_FOCUS event for when Cocoa tries to focus a window.
2013-01-28 14:03:40 +01:00
Ken Thomases
6cde62ac18
winemac: Take control over when a window can become focused away from Cocoa.
2013-01-28 14:03:18 +01:00
Ken Thomases
bd269786a5
winemac: Implement a MOUSE_BUTTON event for mouse clicks.
2013-01-28 14:02:45 +01:00
Ken Thomases
6e59740e18
winemac: Implement WINDOW_FRAME_CHANGED event to tell Wine when window is moved or resized.
2013-01-28 14:00:49 +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
177b67e6bd
winemac: Make each Mac driver window track the HWND it's associated with.
2013-01-21 12:51:18 +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
c0d43fb51f
winemac: Implement layered windows: SetLayeredWindowAttributes() and UpdateLayeredWindow().
2013-01-15 12:17:02 +01:00
Ken Thomases
2d4bcc47be
winemac: Implement SetWindowRgn.
2013-01-15 12:16:52 +01:00
Ken Thomases
7d6ebfa742
winemac: Implement window surface rendering.
2013-01-15 12:16:44 +01:00