Age | Commit message (Collapse) | Author |
|
Avoid relying on GHOST_ISystem::getSystem(), store the system instead.
|
|
|
|
wl_egl_window_resize ran when the window became active/inactive for e.g.
|
|
Nearly all Wayland window data is stored in this struct,
follow this convention so GWL_Window functions can be self contained.
|
|
Add low level gwl_window_* functions.
|
|
Regression in [0] causes LIBDECOR interactions not to be detected.
[0]: deb8ae6bd1edb0983d9ac972b2c95090f4c5e642
|
|
It wasn't so obvious which functions were part of the GHOST API
and which system functions were utilities.
This convention was already in place but not always followed.
|
|
Add a non-blocking version wrapper for wl_display_dispatch_pending.
This uses roughly the same logic as Wayland_PumpEvents in SDL.
Noticed this when investigating T100855.
Note that performing a round-trip doesn't seem necessary from looking
into QT/GTK & SDL event handling loops.
|
|
Help troubleshooting T100855.
|
|
|
|
Currently only used for logging to help with debugging.
|
|
|
|
|
|
|
|
|
|
Support layouts such as AZERTY where the shift key is held for number
keys. Text entry remains unchanged but these keys now activate shortcuts
as expected.
This matches a fix in X11 for the same problem: T47228.
|
|
|
|
Name surfaces for their use.
|
|
This isn't full multi-seat support, instead set the active seat using
pointer/tablet & keyboard enter handlers.
This means that seats beside the first aren't prevented from having
their events handled.
|
|
|
|
Missed clearing the tablet pointer after updating removing the tablet
manager.
|
|
Note issues with track-pad event handling, add some other notes too.
|
|
If opening a pipe failed, 'data_offer->dnd.in_use' wasn't cleared.
Avoid early return where it duplicates logic in an error prone way.
|
|
File level static variable names weren't well distinguished from others.
Use `ghost_wl_` prefix for static variables.
|
|
|
|
There wasn't much advantage in using C++ native types as all Wayland
API's deal with C strings.
|
|
It wasn't clear that this is only used for drag & drop,
also don't use an atomic type as all access is guarded by the
drag & drop mutex.
|
|
A copy of the clipboard was always being, changes would re-read it.
Now read the clipboard on request. This avoids having to keep a copy
of the clipboard in memory as well as the need to keep a thread
to running to read the clipboard for each data-offer.
To prevent a deadlock when pasting from Blender's own clipboard.
- Sending the clipboard (using write(..)) runs in a background thread.
- Reading the clipboard uses a thread that performs round-trips to the
Wayland server to prevent until the read is complete.
This is an update to [0] that resolves the deadlock.
[0]: c03838dbc8cc4a85cfc93914493a0f1562a53366
|
|
When the Wayland pipe can't be opened, don't leave the mutex locked.
Also skip checking wl_data_device_manager when reading from the primary
clipboard.
|
|
wl_registry_destroy does not enjoy being fed a null pointer.
Added a null check to keep it out of trouble.
|
|
There were two issues caused by deferred registration (added by [0]),
one crash on startup (T102075), another unreported issue with the GLX/EGL
context failing to initialize. Unfortunately I'm unable to reproduce the
errors but it seems likely deferring interface registration is not well
supported so this commit uses an alternative solution to some interfaces
depending on others for initialization.
Instead of relying on the order of registration, a separate "update"
callback has been added which is called after binding interfaces.
This has the advantage that it can be called when adding/removing
interfaces at run-time to avoid the dangling pointers being left in
locally allocated structures. In practice adding/removing interfaces
happens so rarely (only with "outputs" as far as I'm aware) that this
benefit is theoretical at the moment.
This should resolve T102075.
[0]: 9fe9705bc0af9d881905d75957c8dd467f8c8cb3
|
|
This reverts commit c03838dbc8cc4a85cfc93914493a0f1562a53366.
Pasting from Blender's own clipboard locked the process.
This needs furhter investigation.
|
|
A copy of the clipboard was always being, changes would re-read it.
Now read the clipboard on request. This avoids having to keep a copy
of the clipboard in memory as well as the need to keep a thread
to running to read the clipboard for each data-offer.
|
|
No longer needed now GWL_Display holds a reference to the registry.
|
|
Keep the registry listener active at runtime, now plugging/unplugging
monitors at run-time is detected and the associated data stored by
Blender is added/removed as well.
Previously all interfaces were detected at startup, afterwards no
changes were supported.
|
|
Defer interface registration so all known interfaces can be called in
the order defined by the array of supported types.
Without this, the compositor defined the order of registration so it
wasn't possible to rely on registration functions to depend on other
interfaces.
This caused initialization for 'seats' to be moved out of the
register callback to ensure multiple interfaces were initialized.
This isn't good for readability or maintenance since it meant the
add/remove callbacks didn't act on matching data.
|
|
Moving widows between monitors with different scale set could flicker
in a feedback loop because the bounds of the window resizing could
cause the bounds of the windows to overlap different monitors.
Now the window is resized immediately, instead of letting the change
to the windows surface scale resize the window.
|
|
|
|
There looks to be an inconsistency between Gnome/KDE here,
match KDE and Gnome applications under X11 (even XWayland)
by making the button closest to the nib MMB, and the other button RMB.
|
|
This makes it possible to access the fractional scaling for a window,
there is no need to store the DPI which can be returned by getDPIHint().
|
|
Avoid top level global pointers, remove the window_manager pointer
and move the clipboard mutex along side the clipboard data.
Also skip updating window DPI if the window doesn't use the output
that changed it's scale.
|
|
Also correct prefix naming.
|
|
Using the 3DConnexion Universal Wireless Receiver on MS-Windows caused
a different ID to be reported. While I'm not sure of the cause of this,
adding the ID doesn't conflict with other devices and fixes the problem.
|
|
|
|
Share logic for adding/removing global objects and freeing them on exit.
Refactor object registration add/remove into an array of callbacks
to localize logic into generic functions for each kind of interface.
Also corrects own error where the primary clipboard manager wasn't
being destroyed on exit.
|
|
It was too easy accidentally break builds without WITH_GHOST_DEBUG
enabled because the arguments were ignored. Now they are expanded in an
`if (0) {...}` block, so invalid expressions result in errors.
|
|
|
|
Missing support for the hold gesture broke building on the build-bot.
Since this gesture was only logged, it's harmless to leave it off.
|
|
Disable libdecor Wayland requirement which would use an X11 fallback.
While the crash could be investigated, using libdecor at all makes
no sense in background mode.
|
|
Add support for zoom & rotate gestures, hold and swipe may
be used in the future although swipe maps to 2D smooth-scroll for
Gnome & KDE.
Tested to work with Apple track-pad & Wacom tablet on Gnome & KDE.
|