Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-12Cleanup: move title into GWL_WindowCampbell Barton
Nearly all Wayland window data is stored in this struct, follow this convention so GWL_Window functions can be self contained.
2022-10-25GHOST/Wayland: store fractional scaling in each window instead of DPICampbell Barton
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().
2022-10-17Cleanup: renaming GHOST/Wayland functions & private membersCampbell Barton
- 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.
2022-09-07Cleanup: rename internal types for GHOST/WaylandCampbell Barton
- 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.
2022-07-01Fix crash with window decorations (libdecor) in WaylandCampbell Barton
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.
2022-07-01Fix accessing windows from surfaces in WaylandCampbell Barton
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
2022-07-01Cleanup: group public utility functions for Wayland System/WindowCampbell Barton
GHOST methods were mixed in with Wayland specific utility functions, making it difficult to navigate or know where to add new functions.
2022-06-30GHOST/Wayland: clarify window access from surfacesCampbell Barton
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.
2022-06-30Cleanup: declare GHOST/Wayland methods constCampbell Barton
Needed when called by functions that are const too.
2022-06-21Cleanup: use full names for generated wayland headers, use own directoryCampbell Barton
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.
2022-06-18GHOST/Wayland: support displaying custom software cursorsCampbell Barton
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.
2022-06-18Fix T98793: Wayland clamps cursor movement fails with gnome-shellCampbell Barton
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.
2022-06-16Cleanup: return const vector for system & window outputs() methodCampbell Barton
Move the enter/leave logic into methods so the method can return a const vector which isn't to be manipulated from other functions.
2022-06-16Fix error selecting the window scale in waylandCampbell Barton
Regression in [0] caused all output to be considered when updating after monitor outputs changed. [0]: ac2a56d7f3d6d20a0ed24ece11eea33e23d42f2c
2022-06-15Cleanup: various minor changes to wayland internal conventionsCampbell Barton
- 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.
2022-06-14Cleanup: don't define wayland window methods as privateCampbell Barton
This meant the system couldn't call window methods unless the window was cast to GHOST_Window.
2022-06-11Cleanup: minor changes to GHOST/Wayland window output accessCampbell Barton
- 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.
2022-02-11File headers: SPDX License migrationCampbell Barton
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
2021-07-16Cleanup: sort struct declarationsCampbell Barton
2021-07-05Replace Ghost integrals with stdint fixed width integers.Nicholas Rishel
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>
2021-06-03GHOST/wayland: adapt window and cursor surface scale to support HiDPI screensChristian Rauch
2020-11-06Cleanup: doxygen comments in ghostCampbell Barton
Use colon after parameters, use hash to reference symbols.
2020-08-07Code Style: use "#pragma once" in intern/ghostJacques Lucke
More information can be found in D8466.
2020-07-22Wayland: draw opaque background when OpenGL alpha is enabledChristian Rauch
2020-05-30GHOST/wayland: use 'is_dialog' flag to prevent drawing into same windowChristian Rauch
2020-04-30GHOST: initial Wayland supportChristian Rauch
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.