Age | Commit message (Collapse) | Author |
|
|
|
Also remove colon after `\note`.
|
|
Scale Mac trackpad scrolling changes by pixel size of output device.
Differential Revision: https://developer.blender.org/D9723
Reviewed by Brecht Van Lommel
|
|
When we had to get special user directories, we'd usually do it in varying,
rather ad-hoc ways. It would be done with a bunch of `#ifdef`s for the
different operating systems. Also, some of the used Win32 functions were legacy
ones and the API docs recommend using newer ones.
Further, seems `BKE_appdir_folder_default()` used `XDG_DOCUMENTS_DIR` wrong.
It's not supposed to be an environment variable but a value inside a config
file.
This adds the platform dependent logic to Ghost, so we can abstract it away
nicely using the `GHOST_ISystemPaths` interface. Getting the desktop directory
for example can now easily be done with:
`GHOST_getUserSpecialDir(GHOST_kUserSpecialDirDesktop).`
For now I added the logic for desktop, documents, downloads, videos, images and
music directories, even though we only use the Documents one. We can extend/
change this as needed, it's easy to do now.
On Windows and macOS, it uses pretty much the same way to access the
directories as elsewhere already. On Linux, it uses the `xdg-user-dir` command
that seems to be available by default on most Linux systems.
No functional changes. The new queries are not actually used yet.
Differential Revision: https://developer.blender.org/D9800
Reviewed by: Brecht Van Lommel
|
|
While this was only needed in 'source/blender/python',
add to ghost to avoid problems in the future.
|
|
The event queue can contain events from before pointer warping, ignore those
now. This is an old issue, but became more common now that we disabled event
coalescing and started using the event mouse location rather than the current
mouse location.
Thanks to Yevgeny Makarov and Nicholas Rishel for helping solve this.
Ref D9662
|
|
Switched timer to use GetTickCount instead of QueryPerformanceCounter
as Wintab's pkTime seems to (but is not guaranteed to) use the former.
|
|
Coalescing on macOS overwrites a singular unprocessed mouse event. To
receive all mouse and tablet events coalescing is disabled.
Disabling coalescing for macOS disables coalescing for trackpad
gestures. Repeat trackpad events are unnecessary and found to
negatively impact performance thus are re-coalesced in Window Manager.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D9574
|
|
|
|
|
|
And remove Blender preference, which was expected to be set to match the system
preference for correct behavior. Instead just handle this automatically.
Differential Revision: https://developer.blender.org/D9402
|
|
|
|
Nicer appearance for the progress bar that is drawn over the application icon during long processes on macOS.
Differential Revision: https://developer.blender.org/D9398
Reviewed by Brecht Van Lommel
|
|
ELEM macro isn't available in GHOST library.
|
|
Use colon after parameters, use hash to reference symbols.
|
|
|
|
Replace 'set' with 'string(APPEND/PREPEND ...)'.
This avoids duplicating the variable name.
|
|
Now that the minimum version is macOS 10.13, we can use the new API.
This reverts commit f97a64aa9b7b384f8221a1ef4f2eef9cde1238db.
|
|
WM_POINTERLEAVE occurs when the pen goes out of range or when a
hovering pen leaves the window's boundary. When leaving the window
boundary the xy position is invalid for some Wacom devices.
This change removes creation of GHOST_EventCursor during
WM_POINTERLEAVE events. This prevents unexpected jumping behavior
during continuous grab.
|
|
|
|
enabled.
|
|
local queue to consume during WM_* mouse events.
|
|
when compared to current time.
|
|
|
|
Added missing function documentation.
|
|
|
|
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
Wintab.
|
|
Previously Wintab was handled by saving the most recent tablet pressure and tilt information and deferred appending tablet infromation to Windows mouse events. This caused synchronization issues evident at the beginning and ending of strokes where pressure and tilt were either ahead or behind in time from mouse button up or down events. This also dicarded swaths of data which resulted in blockly grease pencil lines most apparent when a context switch resulted in several coalesced mouse events.
This patch changes the behavior of Wintab to instead rely entirely on Wintab information for pressure, tilt, position, and button input.
Wintab has several design decisions and conventions which complicate relying soley on it's input while retaining current workflows reliant on non-API behavior. For example, many device optionally allow the user to map barrel buttons to non-mouse actions. These mappings may or may not modify the intended behavior when touching the stylus down, such as scroll vs alt mappings. This behavior is not exposed in the Wintab API, but Wintab will continue updating button state sans this necessary context.
To work around the problem, this refactor synchronizations tablet input to Windows mouse down and up events, this captures events which should result in pen input while allowing events such as pen scrolling. Until a Windows mouse down event fires Wintab input is left unprocessed; when a Windows up event occurs Wintab is processed until a corresponding button up event is found.
Wintab allows for either button state or changes to be reported, but not both. An earlier refactor tried to use button changes to let state to be managed by Wintab. This was replaced when it was found that button change events were unreliable at corner cases such as switching windows. It was also found that with Wacom drivers Wintab peek functions would modify events in the queue causing errant and loss of button events.
For the latter stated reason this patch opts to read all Wintab events into a queue as they arrive, removing events as they become stale. This was chosen over using Wintab peek functions due to the afformentioned issue. As a bonus this seems to work better as it prevents the queue in Wintab from filling, thus neither a flood of events need to be handled when Wintab processing begins and a Wintab implementation need not be trusted to overwrite old events in it's queue.
Maniphest Tasks: T75566
Differential Revision: https://developer.blender.org/D7840
|
|
event to the button down location as this should be a more accurate point
of contact than the last mouse move event.
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
for Pointer input even when Wintab should be preventing Pointer events.
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
events until one is found. This prevents errant cursor moves that occur
before the Wintab button event is reported. We need to skip these events
because if no button event exists, we generate one assuming it will either
arrive later in the Wintab queue or that the button was from a non-Wintab
device. For the case that this was generated by a non-wintab device, such
as buttons mapped to mouse on the tablet pad, these cursor move events can
significantly move the cursor from the intended click position.
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
the issue with Wintab button events are more significant than simply
setting what buttons should receive button up/down events during context
initialization.
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
handling mouse input. This Wintab to mouse synchronization issues, and
likely prevents queue exhaustion for some Wintab implmenetations.
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
window intitialization can specify whether it will be visible regardless
of whether it is yet visible.
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
This reverts commit 045aaf6f78f1fbb6e2bbefd234b7bae04844d42b.
|
|
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
and GHOST_EventCursor.
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
discourage reducing their scope to the only place they're used internally.
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
Button events now include tabletdata, so move is unnecessary.
Generate mouse button events when the system has an event but Wintab did not find a correlated event.
Only filter mouse button events, not Win32 Pointer events.
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
Maniphest Tasks: T75566
Differential Revision: https://developer.blender.org/D7404
|
|
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
This reverts commit e90d8422d0ed38743390f2184fde27550d7b48a7.
|
|
|
|
Don't use the current mouse position at the time the event is handled, but
rather the position at the time of the event. This should make e.g. brush
stroke paths more accurate.
In addition, this may solve issues with other software that does mouse
position smoothing. Ref T82143.
Use of the current mouse position was added in 12b642062c6f as part of a
large commit that also made continuous grab work. But it appears to still
work getting the mouse position from the event.
|
|
Follow our code style for doxygen sections.
|
|
Corrects 34 miscellaneous misspelled words.
Differential Revision: https://developer.blender.org/D9248
Reviewed by Campbell Barton
|