Commit Graph

298 Commits

Author SHA1 Message Date
Ken Thomases eac789c6da winemac: Put clipboard formats synthesized from other standard clipboard formats at the end of the list. 2013-11-22 13:59:33 +01:00
Ken Thomases f2640745b3 winemac: Make macdrv_EnumClipboardFormats() always use macdrv_copy_pasteboard_formats().
This makes sure that the formats are enumerated in a consistent order.
2013-11-22 13:59:08 +01:00
Ken Thomases b28a014c44 winemac: Cache the "natural" clipboard format entry associated with synthesized built-in entries at startup. 2013-11-22 13:59:03 +01:00
Ken Thomases ee53ea4b93 winemac: Add a function to find the "natural" clipboard format entry for a format ID. 2013-11-22 13:58:48 +01:00
Ken Thomases a0061e0a30 winemac: Synthesize text clipboard formats in CF_TEXT, CF_OEMTEXT, CF_UNICODETEXT order. 2013-11-22 13:58:42 +01:00
Ken Thomases d98dbf8fbd winemac: Synthesize CF_METAFILEPICT from CF_ENHMETAFILE. 2013-11-22 13:58:33 +01:00
Ken Thomases 53089bff2e winemac: Synthesize CF_ENHMETAFILE from CF_METAFILEPICT. 2013-11-22 13:58:28 +01:00
Ken Thomases 29236cce4c winemac: Add support for the CF_ENHMETAFILE clipboard format. 2013-11-22 13:58:20 +01:00
Ken Thomases cdad61369c winemac: Add support for the CF_METAFILEPICT clipboard format. 2013-11-22 13:58:12 +01:00
Ken Thomases a983cfb01d winemac: Ignore Mac-originating pasteboard types which aren't mapped to standard clipboard formats.
New clipboard formats had been registered for them, but that was pointless.
No Windows app would ever expect or make use of such clipboard formats or the
associated pasteboard data.
2013-11-22 13:58:02 +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
Ken Thomases f6a8c5b50e winemac: Take WS_EX_TOOLWINDOW into account when computing how much of a window is replaced by the Mac decorations. 2013-11-21 19:39:01 +01:00
Ken Thomases 682ed91017 winemac: Defer attaching OpenGL context to a view which is zero-sized or outside its window's bounds.
That fails with the dread "invalid drawable" message.
2013-11-21 13:31:33 +01:00
Ken Thomases 19862b4138 winemac: Make macdrv_set_cocoa_window_frame() synchronous again.
It has a non-object pointer from the caller, so it can't allow the caller
to continue until it's finished with it.  Also, it discards events from the
event queue and we don't want the caller to process them first.

Fixes brokenness introduced by 784a9139.
2013-11-21 13:31:14 +01:00
Huw Davies c4761d8002 winemac: Actually set the system's keyboard layout. 2013-11-20 19:39:05 +01:00
Huw Davies f6e2af6843 winemac: Retrieve the real keyboard layout where appropriate. 2013-11-20 19:39:03 +01:00
Huw Davies 22008f7fd9 winemac: Update the thread's active_keyboard_layout on keyboard change. 2013-11-20 19:39:01 +01:00
Huw Davies f344d7a213 winemac: Update the layout list if the enabled input sources change. 2013-11-20 19:38:59 +01:00
Huw Davies fecaab9cfd winemac: Implement GetKeyboardLayoutList. 2013-11-20 19:38:56 +01:00
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 aa53603135 winemac: Reduce duplicated code by consolidating exit paths from format_for_type(). 2013-11-06 15:52:48 +01:00
Ken Thomases 7c0c30b4d6 winemac: Fix search for clipboard format matching a pasteboard type so it can fail when it should.
It had been acting as though the last registered clipboard format always
matched any pasteboard type.
2013-11-06 15:52:45 +01:00
Rico Schüller 2fa9b7ebb5 opengl32: Use opengl xml registry files. 2013-11-05 20:38:21 +01:00
Ken Thomases 8e1fdb845e winemac: Trace flags of WINDOW_FRAME_CHANGED events. 2013-11-01 10:51:27 +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
Ken Thomases 6b9f81271b winemac: Hide cursor when first requested even if we don't know it's over a window.
The tracking of whether it is over a window or not is only updated when the
mouse moves.  If a window was created or moved under it, then the state can be
stale.  That caused us to defer hiding the cursor until the mouse was moved.
This happens at the start of games pretty often.
2013-10-30 15:29:42 +01:00
Ken Thomases 2f68e47167 winemac: Don't use the main dispatch queue to implement OnMainThread() for a thread with no event queue.
The main dispatch queue is a serial queue and is a shared resource.  If we
submit a long-running task to it, then no other tasks, including those submitted
by the system frameworks, can run until it completes.
2013-10-30 15:29:33 +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 35f0cf26b0 winemac: Send WM_CANCELMODE when keyboard layout changes from Cocoa side.
The standard keyboard shortcut for switching the keyboard layout is Command-
Space, but the Mac driver never sees the Space key press.  So, Wine only sees
a press and release of Alt, which puts focus on the menu bar.  This prevents
that focus change.
2013-10-24 10:54:55 +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 639c202ea7 winemac: Use an init once function to register IME classes. 2013-10-22 10:25:36 +02:00
Alexandre Julliard 5435dad997 winemac: Only register the IME class when needed. 2013-10-21 14:46:25 +02:00
Ken Thomases 3ececfd2a5 winemac: Fix a leak in macdrv_CountClipboardFormats(). (Clang). 2013-10-21 10:46:44 +02:00
Ken Thomases 49197e811b winemac: Rename some confusingly-named variables. 2013-10-21 10:46:33 +02:00
Ken Thomases c7f8e71ab6 winemac: Fix some bytes-vs-WCHARs length computation bugs in the UTF-16 clipboard support. 2013-10-21 10:46:29 +02:00
Ken Thomases 1c049e5031 winemac: Restore app cursor settings when cursor moves back into an app window.
The code had previously set the cursor back to the standard arrow and unhid
it when it left all app windows.  Now it restores the cursor image that the
app set and re-hides it if necessary when it moves back over any app window.
2013-10-18 11:33:32 +02:00
Ken Thomases 8747df094d winemac: Treat mouse moves in a window title bar as outside the window.
Don't queue mouse-moved events.  Reset the cursor.
2013-10-18 11:32:53 +02:00
Ken Thomases 761092a2fe winemac: Clean up fully-delivered events in queues which aren't being drained.
Some events get queued for all GUI-connected threads but are only processed
by the first to dequeue them.  Other threads which tend their event queue
discard such already-processed events.  However, some threads may be
connected to the GUI but never tend their event queue.  To prevent such
threads from accumulating zombie events, the zombies are cleared each time a
new event is queued.
2013-10-18 11:32:37 +02:00
Ken Thomases 9deb00bfdc winemac: Don't coalesce events which might be in multiple queues. 2013-10-18 11:32:23 +02:00
Kevin Eaves 771fcd894a winemac: Restore the window title when the window style is changed. 2013-10-17 20:29:25 +02:00
Alexandre Julliard 6ae1e33a17 winemac: Clear the thread data explicitly on detach. 2013-10-16 20:49:24 +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
Frédéric Delanoy 510e30bd63 winemac.drv: Use BOOL type where appropriate. 2013-10-09 10:08:34 +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 9779f0ace4 winemac: If the app doesn't specify a custom max. tracking size, don't restrict Cocoa. 2013-10-08 15:39:01 +02:00