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-06-30Cleanup: fix compiler warningsBrecht Van Lommel
"override" should be used either for all methods or none, otherwise Clang gives warnings. Adding it for all platforms is a bigger change.
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-30GHOST/Wayland: use flush instead of roundtripCampbell Barton
Using flush avoids handling new events which complicates logic here.
2022-06-30Fix key/dnd event handling accessing freed memory under WaylandCampbell Barton
Closing a window could leave danging pointers which Wayland callbacks are responsible for clearing. However, any calls Blender makes that don't originate from Wayland's handlers don't have that assurance (key-repeat in this case). Resolve by using a window lookup on each key-repeat event.
2022-06-30Fix accessing cursor position for GHOST/WaylandCampbell Barton
GHOST_GetCursorPosition wasn't working properly under Wayland because the last focused window didn't necessarily match the window used to call wm_cursor_position_get(..). Now the window passed into wm_cursor_position_get is passed to GHOST so that window is used to access cursor coordinates.
2022-06-30GHOST: get/set cursor position now uses client instead of screen coordsCampbell Barton
Use client (window) relative coordinates for cursor position access, this only moves the conversion from window-manager into GHOST, (no functional changes). This is needed for fix a bug in GHOST/Wayland which doesn't support accessing absolute cursor coordinates & the window is needed to properly access the cursor coordinates. As it happens every caller to GHOST_GetCursorPosition was already making the values window-relative, so there is little benefit in attempting to workaround the problem on the Wayland side. If needed the screen-space versions of functions can be exposed again.
2022-06-30Fix memory leak with off-screen buffers under WaylandCampbell Barton
Each off-screen buffer created a surface and EGL window which was only freed when Blender exited. Resolve by freeing the associated data when disposing the off-screen context.
2022-06-30Cleanup: declare GHOST/Wayland methods constCampbell Barton
Needed when called by functions that are const too.
2022-06-29GHOST/Wayland: quiet warning with empty title with libdecorCampbell Barton
Set the title before showing the window.
2022-06-29GHOST/Wayland: support older output manager (for Weston support)Campbell Barton
Support zxdg_output_manager_v1 v2, as weston only supports this. Even though it's a reference implementation it can be useful for testing.
2022-06-29Cleanup: spelling in commentsCampbell Barton
2022-06-28Cleanup: replace magic number with define for scan-code/key-code offsetCampbell Barton
2022-06-28GHOST/Wayland: avoid creating a keyboard-state each key press/releaseCampbell Barton
Instead, create keyboard two states when the keyboard layout is set (one with & one without num-lock pressed). This avoids key-press lookups having to check if num-lock exists and setting the keyboard state for key press & release events. No functional changes.
2022-06-28Fix T96170: keys mis-mapped with NeoQwertz layout under WaylandCampbell Barton
Accessing the symbols for keys with no modifiers & num-lock enabled has unintended consequences for some keyboard layouts that use this to switch layers. Resolve by restricting num-locked lookups to keys typically toggled with num-lock (key-pad home, page up/down ... etc).
2022-06-28Cleanup: group wayland event codes in their own doxy sectionCampbell Barton
Also don't pass typedef'd ints as references.
2022-06-28Fix T99202: AccentGrave key doesn't work with WaylandCampbell Barton
Implement scan-code fallback when the scan-code used for AccentGrave on US keyboards doesn't map to a key known to GHOST. Without this, shortcuts that use AccentGrave are inaccessible and the key does nothing. This matches functionality from X11, see [0]. [0]: f3427cbc981e5ad530d1a73ab4ecbf6b64751774
2022-06-28GHOST: only use GHOST_PRINT when WITH_GHOST_DEBUG is enabledCampbell Barton
Revert part of [0] so only assert behavior is changed. [0]: 9b5dda3b07496bda28970dfd23e4951a76d0f8ed
2022-06-27Fix broken build on macOS after recent changesBrecht Van Lommel
2022-06-27Cleanup: rename misleading/inconsistent GHOST typesCampbell Barton
Remove mask suffix from: - GHOST_TButtonMask - GHOST_TModifierKeyMask .. neither are used as bit-masks. Remove 'Grab' from: - GHOST_kGrabAxisNone - GHOST_kGrabAxisY .. matching the existing GHOST_TAxisFlag & GHOST_kAxisX.
2022-06-27Cleanup: spelling in commentsCampbell Barton
2022-06-27GHOST/Wayland: Add a build time option for DBUS, disable by defaultCampbell Barton
Add WITH_GHOST_WAYLAND_DBUS option, so Blender can be built without DBUS support. Currently it's only used to access the cursor theme. Without this the "default" cursors are used instead. Disabling this since it adds an additional dependency for a minor gain in functionality, with the benefit of removing a library requirement. There is also a problem where Blender hangs on startup for ~5 seconds when DBUS isn't running. Eventually it would be good to be able to avoid this problem without a build option.
2022-06-27GHOST/Wayland: set the minimum window size with libdecorCampbell Barton
2022-06-27GHOST/Wayland: split pointer/tablet state into separate structsCampbell Barton
For Wayland the mouse & tablet are separate devices with their own location, button-pressed state and focused window. Split internal state storage so they're separate. Also track mouse button press/release state without needing focused windows.
2022-06-24GHOST/Wayland: support client-side window decorationsChristian Rauch
This implements client-side window decorations for moving and resizing windows and HiDPI support. This functionality depends on the external project 'libdecor' that is currently a build option: WITH_GHOST_WAYLAND_LIBDECOR. Reviewed by: brecht, campbellbarton Ref D7989
2022-06-24GHOST/Wayland: support for cursor warp with hidden/wrapped grab enabledCampbell Barton
As grab already uses it's own virtual coordinates, cursor warping can be used when grab is enabled. Currently nothing depends on this however it could be useful in future.
2022-06-24Cleanup: add C++ compatible WL_ARRAY_FOR_EACH macroCampbell Barton
2022-06-24Cleanup: remove unused cursor struct members in GHOST/WaylandCampbell Barton
2022-06-24Cleanup: use const arguments for GHOST/WaylandCampbell Barton
2022-06-24GHOST: use GHOST_ASSERT for non-release buildsCampbell Barton
GHOST_ASSERT now matches BLI_assert, which is only ignored for release builds. Otherwise it prints or asserts when WITH_ASSERT_ABORT is enabled.
2022-06-24Docs: correct GHOST_TimerProcPtr time doc-stringCampbell Barton
2022-06-24Fix outdated pressure/tilt for tablet motions events under GHOST/WaylandCampbell Barton
Accumulate tablet data before generating an event using the 'frame' callback.
2022-06-23Fix key repeat continuing after a window loses focus for GHOST/WaylandCampbell Barton
Also remove NULL checks in keyboard enter/leave handlers, as they didn't serve any purpose.
2022-06-23Fix key repeat behavior for GHOST/WaylandCampbell Barton
- Respect modifier keys (Shift press/release didn't change the case). - Changing modifiers resets the timer instead of canceling key-repeat. - Releasing keys (besides the key being repeated) resets the timer instead of canceling key repeat. This makes key-repeat behave the same way as GTK & WIN32 text input.
2022-06-22Fix T99078: Crash closing the file selector in WaylandCampbell Barton
Ensure wayland handlers run that clear the window immediately after the window has been removed so dangling pointers to the window aren't left set.
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-21Fix error in GHOST_ASSERT under WaylandCampbell Barton
2022-06-20Cleanup: avoid duplicate lookups when setting the cursorCampbell Barton
Also use `const char *` for cursor names as there isn't an advantage in using `std::string`.
2022-06-20Fix setting the custom cursor for Hi-DPI displays in WaylandCampbell Barton
Changing the cursor would intermittently close Blender's window (without crashing). This happened because the size of a cursor must be the a multiple of the scale, for themed cursor this is always true but with custom cursors it's not. Separate theme scale from custom cursor scale to avoid this bug. In the future we can support Hi-DPI custom cursors, for now they're scale is always set to 1.
2022-06-20GHOST/Wayland: refactor cursor handling & fix errors hiding the cursorCampbell Barton
- Support showing & hiding the cursor without setting the buffer, needed to switch between software and hardware cursor. - Track the state of the software/hardware cursor. This resolves glitches switching between cursors sometimes hiding the cursor.
2022-06-18GHOST/Wayland: implement getAllDisplayDimensionsCampbell Barton
2022-06-18Fix initial window size being scaled down for Hi-DPI displays in WaylandCampbell Barton
getMainDisplayDimensions return values were scaled by the UI-scale, instead of returning pixel values. Also correct an error accessing the rotated monitor size, which happened to be harmless as the value isn't used at the moment.
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 crash in wayland when closing a windowCampbell Barton
The focus_pointer only pointer was only cleared when the window existed, which caused a dangling focus_pointer when closing a window.
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-18GHOST: add GHOST_Rect.clampPoint methodCampbell Barton
Method for clamping a point inside a rectangle.
2022-06-17Fix T98944: Uninitialized XRFrameState can prevent VR/OpenXR viewingPeter Kim
This provides a workaround for the VR session stopping due to an error in locating controller poses. The problem was that for the actions sync on the first frame, the session's XrFrameState/predicted display time had not been initialized yet, which led to an error in xrLocateSpace() (the error was only observed for some OpenXR runtimes since the first frame pose state would be inactive for other runtimes, skipping the call to xrLocateSpace()). The timing of action updates relative to frame state updates could be reworked in the future, but for now simply check for a valid display time to avoid an error on the first frame.
2022-06-17GHOST/Wayland: skip cursor surface operations when hiding the cursorCampbell Barton
Also set the buffer scale before setting the cursor (matching SDL).
2022-06-17Cleanup: use booleans for GHOST C-APICampbell Barton
Also use GHOST_ prefix for public functions.
2022-06-17Cleanup: clang-tidy for GHOSTCampbell Barton
2022-06-17Cleanup: spelling in commentsCampbell Barton