Age | Commit message (Collapse) | Author |
|
Nearly all Wayland window data is stored in this struct,
follow this convention so GWL_Window functions can be self contained.
|
|
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().
|
|
- Use `_` suffix for private members.
- Use `wl_` prefix for Wayland native types to help distinguish
them from local types.
- Replace single character names `d` & `w` with `display` `window`.
- Rename `selection` to `clipboard`. Using the primary selection as a
clipboard is a separate and as yet unsupported feature.
|
|
- Use pascel-case type names, instead of snake-case with `_t` suffix.
- Use `GWL_` prefix (short for GhostWayLand), to distinguish these
types from ghost (`GHOST_*`) and wayland (`wl_*`) types.
- Rename `input` to `seat` (following wayland's own terminology).
- Use `wl_` prefix for wayland native variables which have locally
defined equivalents so `GWL_Output *output` isn't confused with
`struct wl_output *wl_output`. As the locally defined types are used
more often this is less verbose overall.
|
|
Surfaces from window decorations were passed into GHOST's listeners
since libdecor & GHOST share a connection.
This error introduced by recent changes that assumed surfaces passed to
GHOST's handler functions were owned by GHOST.
Tag GHOST surfaces & outputs to ensure GHOST only attempts to access
data it created.
|
|
This is a follow up to [0], where it was assumed flushing the output
would run the appropriate leave handlers & clear the keyboard & pointer
surfaces. While that's mostly true it's not guaranteed.
Resolve this by clearing the pointers when closing windows and add NULL
checks before accessing the windows.
Tested with Gnome, KDE & River compositors.
[0]: 58ccd8338e53423e223085094af2d35c76285c30
|
|
GHOST methods were mixed in with Wayland specific utility functions,
making it difficult to navigate or know where to add new functions.
|
|
It wasn't obvious when direct access or lookups should be used.
Add class methods for direct lookups as well as searching from known
windows when windows are accessed outside Wayland's handlers.
This avoids having to check if the window has been removed in some cases.
|
|
Needed when called by functions that are const too.
|
|
Instead of providing our own names for wayland headers, use the filename
component as the basis for the header names. This matches most reference
documentation for Wayland.
Also generate client protocols into a sub-directory `libwayland`,
instead of generating headers into the ghost directory. Making the
include path more specific & makes it easier to differentiate generated
headers from other build files.
|
|
Add a method to access the custom cursor from GHOST which is used
for drawing a software cursor. This means the knife tools cursor now
work as expected.
Although non-custom cursors are still not supported.
|
|
The current gnome-shell (v42.2) has a bug where grabbing the cursor
doesn't scale the region when confining it to the window.
For Hi-DPI displays this means the cursor may be confined to a quarter
of the window, making grab unusable.
Even though this has been fixed up-stream the issue remains in the
latest release - so workaround the problem by implementing window
confined grab using a software cursor.
This is only used gnome-shell for displays that use Hi-DPI scaling.
|
|
Move the enter/leave logic into methods so the method can return a const
vector which isn't to be manipulated from other functions.
|
|
Regression in [0] caused all output to be considered when updating
after monitor outputs changed.
[0]: ac2a56d7f3d6d20a0ed24ece11eea33e23d42f2c
|
|
- Initialize values in the struct declarations
(help avoid accidental uninitialized struct members).
- Use `wl_` prefix for some types to avoid e.g. `output->output`.
- Use `_fn` suffix for locally defined function variables.
- Use `_handle_` as separator for handlers, making function names easier
to follow as this separates the handler name from the interface.
- Add doxy sections for listeners in GHOST_WaylandWindow.cpp.
|
|
This meant the system couldn't call window methods unless the window
was cast to GHOST_Window.
|
|
- Use a window method to handle updating the window after scale changes.
This avoids the need for methods that return mutable references to
DPI & scale.
- Remove window.outputs() method that returned window->system->outputs
as it is misleading to expose these as window outputs when the outpurs
returned are all known outputs.
- Use a vector instead of an unordered_set to store window outputs,
while a 'set' does make sense, it means the outputs can't be accessed
in the order they're added which may be useful for further changes.
- Use early returns.
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
|
|
Also replace integer with bool in Ghost API when only used as boolean,
and uint8* with char* in Ghost API when variable is a string.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D11617
Signed-off-by: Nicholas Rishel <rishel.nick@gmail.com>
|
|
|
|
Use colon after parameters, use hash to reference symbols.
|
|
More information can be found in D8466.
|
|
|
|
|
|
Usable with the CMake option 'WITH_GHOST_WAYLAND'
The following functionality is working:
- Building with X11 and Wayland at the same time,
wayland is used when available.
- Keyboard, pointer handling.
- Cursor handling.
- Dedicated off-screen windows.
- Drag & drop.
- Copy & paste.
- Pointer grabbing.
See D6567 for further details.
|