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-08-26Cleanup: spelling in comments, formatCampbell Barton
2022-08-26Fix incorrect UI scaling after changing monitors DPI under WaylandCampbell Barton
Add a GHOST_kEventWindowDPIHintChanged event to ensure the UI is properly updated.
2022-08-25Fix accessing freed memory for GHOST/Wayland clipboard accessCampbell Barton
2022-08-19Fix T89399: Mouse wrapping causes erratic movementGermano Cavalcante
As mentioned in T89399, "the source of this bug is that cursor wrap moves the cursor, but when it later checks the mouse position it hasn't yet been updated, so it re-wraps". As far as I could see, this happens for two reasons: 1. During the first warp, there are already other mousemove events in the queue with an outdated position. 2. Sometimes Windows occasionally and inexplicably ignores `SetCursorPos()` or `SendInput()` events. (See [1]) The solution consists in checking if the cursor is inside the bounds right after wrapping. If it's not inside, it indicates that the wrapping either didn't work or the event is out of date. In these cases do not change the "accum" values. 1. https://github.com/libsdl-org/SDL/blob/f317d619ccd22e60cebf1b09d716d3985359c981/src/video/windows/SDL_windowsmouse.c#L255) Maniphest Tasks: T89399 Differential Revision: https://developer.blender.org/D15707
2022-08-18CMake: always unset CMAKE_REQUIRED_* variables after useCampbell Barton
Always unset these variables after use as they could interfere with other checks made afterwards.
2022-08-17Cleanup: Fix "unused m_system" warningsSebastian Parborg
The dummy `m_system` variable is not needed in the GHOST_NULL classes
2022-08-17GHOST/EGL: Only draw grey into buffers attached to windowsCampbell Barton
Avoid redundant drawing, match GHOST/GLX behavior.
2022-08-16GHOST/Wayland: Add NDOF supportCampbell Barton
Logic for NDOF devices is shared with X11, process events using GHOST_NDOFManagerUnix when WITH_INPUT_NDOF is enabled.
2022-08-16Cleanup: spelling in commentsCampbell Barton
2022-08-15Introduce headless OpenGL rendering on LinuxSebastian Parborg
With this patch true headless OpenGL rendering is now possible on Linux. It changes the logic of the WITH_HEADLESS build flag. The headless backend is now always available with regular builds and Blender will try to fall back to it if it fails to initialize other backends while in background mode. The headless backend only works on Linux as EGL is not used on Mac or Windows. libepoxy does support windows and mac, so this can perhaps be remedied in the future. Reviewed By: Brecht, Jeroen, Campbell Differential Revision: http://developer.blender.org/D15555
2022-08-15Cleanup OpenGL linking and related code after libepoxy mergeSebastian Parborg
This cleans up the OpenGL build flags and linking. It additionally also removes some dead code. One of these dead code paths is WITH_X11_ALPHA which actually never was active even with the build flag on. The call to use this was never called because the default initializer for GHOST was set to have it off per default. Nothing called this function with a boolean value to enable it. These cleanups are needed to support true headless OpenGL rendering. Without these cleanups libepoxy will fail to load the correct OpenGL Libraries as we have already linked them to the blender binary. Reviewed By: Brecht, Campbell, Jeroen Differential Revision: http://developer.blender.org/D15554
2022-08-15GPU: replace GLEW with libepoxyChristian Rauch
With libepoxy we can choose between EGL and GLX at runtime, as well as dynamically open EGL and GLX libraries without linking to them. This will make it possible to build with Wayland, EGL, GLVND support while still running on systems that only have X11, GLX and libGL. It also paves the way for headless rendering through EGL. libepoxy is a new library dependency, and is included in the precompiled libraries. GLEW is no longer a dependency, and WITH_SYSTEM_GLEW was removed. Includes contributions by Brecht Van Lommel, Ray Molenkamp, Campbell Barton and Sergey Sharybin. Ref T76428 Differential Revision: https://developer.blender.org/D15291
2022-08-13Merge branch 'blender-v3.3-release'Germano Cavalcante
2022-08-13Fix T100354: Home key being the grave accent in french keyboard layoutGermano Cavalcante
I'm still not sure how the `0xFF` value came about, but it's not a valid virtual key code. Therefore it should not be used in `MapVirtualKey`.
2022-08-12Cleanup: add missing braces, quite warnings by castingCampbell Barton
2022-08-12Cleanup: use 'filepath' for fill pathsCampbell Barton
2022-08-12Cleanup: add missing braces in GHOSTCampbell Barton
2022-08-12Cleanup: clang-tidy GHOST Context/Event/TimerManagerCampbell Barton
2022-08-11GHOST/Wayland: support setting modifiers on window activationCampbell Barton
Take advantage of Waylands wl_keyboard_listener.enter callback which takes an array of keys that are pressed when a window is activated. Resolves T74684 under Wayland.
2022-08-11Cleanup: access modifier keys by index under WaylandCampbell Barton
This simplifies accessing modifiers as there is no need to perform a string lookup each time (which may fail).
2022-08-11Cleanup: missing newline in GHOST_PRINTCampbell Barton
2022-08-09Cleanup: use own username in code-comment tagsCampbell Barton
2022-08-04Fix broken build due to missing include.Bastien Montagne
Caused by rBa95103f6f4abda2b. Please build blender before committing!
2022-08-04Fix leak when the cursor leaves the window while dragging in WaylandCampbell Barton
2022-08-04Fix double-free after drag & drop with GHOST/WaylandCampbell Barton
Resolve crash on exit after drag & drop in Wayland.
2022-08-04GHOST/Wayland: support URL decoding for file drag & dropCampbell Barton
Paths that contained characters that needed escaping as URL's failed to import. Move URL decoding to a new file (GHOST_PathUtils), shared with X11 but maybe be useful for other platforms too.
2022-08-04Fix drag & drop in Wayland with some applicationsCampbell Barton
Drag & drop worked with GTK3 apps but not QT5 (pcmanfm-qt for eg) as files are separated by '\n' instead of '\r\n'. Resolve by supporting both (follow up to T99737).
2022-08-04GHOST/Wayland: improve logging for drag & dropCampbell Barton
Log the response for dropping events to simplify troubleshooting drag & drop failure.
2022-08-03Image: Display GPU layout in `uiTemplateImageInfo`Angus Stanton
Add IMB_gpu_get_texture_format and GPU_texture_format_description to retrieve and 'stringify' an eGPUTextureFormat. These are then used in the image info panel used in several areas across blender. New Information: {F13330937} Reviewed By: jbakker Maniphest Tasks: T99998 Differential Revision: https://developer.blender.org/D15575
2022-07-26Cleanup: spelling in commentsCampbell Barton
2022-07-22GHOST/Wayland: Fix mouse wheel events for Sway Compositor (use seat v5)Campbell Barton
Bump the requested seat version to v5, use discreet scroll callback. Tested with gnome, river & sway.
2022-07-21Fix T91932: number sliders wrap around when dragged for long distance on X11Sebastiano Barrera
The value of number sliders (e.g. the "end frame" button) wrap around to their pre-click value when dragging them for a very long distance (e.g. by lifting the mouse off the desk and placing it back on to keep dragging in the same direction). The problem is X11-specific, and due to XTranslateCoordinates using a signed int16 behind the curtains, while its signature and the rest of Blender uses int32. The solution is to only use XTranslateCoordinates on (0, 0) to get the delta between the screen and client reference systems, and applying the delta in a second step. Differential Revision: https://developer.blender.org/D15507
2022-07-21GHOST/Wayland: fix cursor glitch after grabbing while hiddenCampbell Barton
When the cursor grabbing was disabled, Blender's internal location (wmWindow.eventstate) kept the location before un-hiding. This caused the paint cursor to show in the wrong location after adjusting the color wheel for e.g.
2022-07-15GHOST/Wayland: partial support for updating the UI scaleCampbell Barton
Partial support for changing the UI scale while Blender is open. The scale is set but issues with the window size not updating remain.
2022-07-15GHOST/Wayland: fix error setting the cursor scaleCampbell Barton
Calculate a scale that's compatible with the cursor size. Needed so the cursor is always a multiple of scale.
2022-07-14Cleanup: clang-tidy changes to GHOST_SystemX11Campbell Barton
Also remove redundant check.
2022-07-14GHOST: remove redundant ascii argument to GHOST_EventKeyCampbell Barton
Now only the utf8 buffer is used there is no reason to pass both.
2022-07-14GHOST/X11: avoid redundant utf8 text lookups for release eventsCampbell Barton
The text representation of release events is never used, so only calculate this for press events.
2022-07-14GHOST/X11: Quiet warning about key-release events having their utf8 setCampbell Barton
Quiet warning from [0], no functional change as the this information was always ignored. Key release events shouldn't have associated text, this was cleared for wmEvent's, so there is no reason to pass it from GHOST. [0]: d6fef73ef110eb43756b7b87c2cba80abae3b39f
2022-07-14Cleanup: update & correct comments for event handlingCampbell Barton
- Remove references to `ISTEXTINPUT` as any keyboard event with it's utf8_buf set can be handled as text input. - Update references to the key repeat flag.
2022-07-14WM: Remove ASCII members from wmEvent & GHOST_TEventKeyDataCampbell Barton
The `ascii` member was only kept for historic reason as some platforms didn't support utf8 when it was first introduced. Remove the `ascii` struct members since many checks used this as a fall-back for utf8_buf not being set which isn't needed. There are a few cases where it's convenient to access the ASCII value of an event (or nil) so a function has been added to do that. *Details* - WM_event_utf8_to_ascii() has been added for the few cases an events ASCII value needs to be accessed, this just avoids having to do multi-byte character checks in-line. - RNA Event.ascii remains, using utf8_buf[0] for single byte characters. - GHOST_TEventKeyData.ascii has been removed. - To avoid regressions non-ASCII Latin1 characters from GHOST are converted into multi-byte UTF8, when building X11 without XInput & X_HAVE_UTF8_STRING it seems like could still occur.
2022-07-14GHOST/SDL: pass in utf8 buffer for keyboard eventsCampbell Barton
While GHOST/SDL doesn't support non-ASCII text input, use the UTF8 buffer to be consistent with all other back-ends. Move the conversion from SDL_KeyboardEvent to ASCII into a function. Also only lookup this value on key press (not release).
2022-07-14GHOST/SDL: add support for the key repeat flagCampbell Barton
Now all ghost back-ends support the key repeat flag (accessed as WM_EVENT_IS_REPEAT from wmEvent.flag).
2022-07-11Cleanup: remove unused GHOST function getAnyModifiedState.Campbell Barton
Remove unused GHOST_WindowManager::getAnyModifiedState()
2022-07-09Fix cursor display size with tablet input in GHOST/WaylandCampbell Barton
The scale for tablet cursor surfaces was never set, making them display larger. Now the outputs scale is set for mouse & tablet cursors.
2022-07-09Cleanup: split out wl_buffer creation into a utility functionCampbell Barton
Simplify logic for initializing the wl_buffer, ensure the cursors custom data is never heft in a half initialized state. Also remove the need for multiple calls to close when handling errors.
2022-07-09Cleanup: remove buffer_t in GHOST/WaylandCampbell Barton
This was allocated and only used to store the custom cursor data. Use a pointer & size member instead for simplicity.
2022-07-09Cleanup: split memfd_create into it's own function for WaylandCampbell Barton
Avoid ifdef's in cursor loading by creating a memfd_create_sealed utility function that works irrespective of memfd_create availability.
2022-07-09Fix resource leaks setting custom cursors in WaylandCampbell Barton
- Memory from the prior cursor was never un-mapped. - posix_fallocate failure left a file handle open..
2022-07-08GHOST/Wayland: add logging for listener handlersCampbell Barton
Add logging to all Wayland listener callbacks as it can be difficult to detect the cause of problems. Using break-points often isn't practical for debugging interactive windowing / compositor issues Logging needs to be enabled on the command line, e.g: blender --log "ghost.wl.*" --log-level 2 --log-show-basename