Commit Graph

11 Commits

Author SHA1 Message Date
Campbell Barton 6e0037e54d Fix #115878: build error with LIBDECOR & WITH_GHOST_WAYLAND_DYNLOAD=OFF
There were two problems here:

- libdecor_frame_get_content_* is not available in LIBDECOR v0.1.0.
- These functions aren't exposed by <libdecor.h>,
  they're only exposed by `libdecor-plugin.h`
  (intended for plug-ins that implement window decorations).

Resolve by storing the last applied size from LIBDECOR for reuse.
2023-12-13 10:17:07 +11:00
Campbell Barton df6cedeee1 Merge branch 'blender-v4.0-release' 2023-10-18 14:40:39 +11:00
Campbell Barton bafb36f8bc Fix glitches resizing windows on Wayland, LIBDECOR & fractional scaling
When fractional scaling is used, window sizes from LIBDECOR are still
divided by the window-decorations internal buffer scale which doesn't
match the GHOST window (always 1 in the case of fractional scale).

Also resolve glitches caused by recalculating the window size when
no size change was intended. In this case reuse LIBDECOR's internal
size so there are never any changes (caused by rounding for e.g.).
2023-10-18 14:37:11 +11:00
Campbell Barton 1bb098bf44 CMake: WITH_OPENGL_BACKEND=OFF excludes EGL/EPOXY includes & libraries
This isn't complete as opensubdiv, hydra & XR still depend on OpenGL.
2023-10-07 18:30:17 +11:00
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Campbell Barton 65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Campbell Barton aee5fcc120 GHOST/Wayland: improve workaround for libdecor setting the window state
libdecor has a workaround where creating the window would loop until
the windows configure callback ran.

Simplify this workaround by setting the initial state on the underlying
xdg_toplevel struct.

Also correct mixup between bool / GHOST_TSuccess types.
2022-11-16 12:31:29 +11:00
Campbell Barton deb8ae6bd1 GHOST/Wayland: replace roundtrip with dispatch_pending
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.
2022-11-12 15:11:43 +11:00
Sergey Sharybin 6e2437d82b Fix missing wl_display_get_error in the Wayland dynamic loader
Some of the previous commits in Wayland related code added use
of this function, but did not update the dynamic loader. This
broke compilation of configurations which use dynamic loader
for Wayland (which is the official way oh how Blender is built).
2022-11-10 12:40:23 +01:00
Campbell Barton 42f37106c5 GHOST/Wayland: add listener for touch events (no touch support yet)
Currently unused as my tablet isn't generating touch events.
This may be useful for development as touch events are logged.
2022-10-19 14:53:48 +11:00
Campbell Barton e58e023e1a GHOST/Wayland: support dynamic loading libraries for Wayland
Add intern/wayland_dynload which is used when WITH_GHOST_WAYLAND_DYNLOAD
is enabled (off by default). When enabled, systems without Wayland
installed will fall back to X11.

This allows Blender to dynamically load:
- libwayland-client
- libwayland-cursor
- libwayland-egl
- libdecor-0 (when WITH_GHOST_WAYLAND_LIBDECOR is enabled).
2022-07-06 15:30:47 +10:00