Commit Graph

1184 Commits

Author SHA1 Message Date
ArchercatNEO 8be7b9f18c Wayland: Fix use-after-free of Ref<ColorManagementProfile>
Fixes #117676
PR #111964 made a Ref<ColorManagementProfile> which we intentionally
leaked across a client-server barrier owned, which caused a use-after-free.
Manually adding reference/unreference calls keeps the ptr valid without memory leaks.
2026-03-21 09:28:43 +00:00
Thaddeus Crews fb4a304dee Merge pull request #111965 from Ivorforce/memnew-typed
Make `memnew(RefCounted)` return `Ref`, to improve ownership safety
2026-03-19 15:39:15 -05:00
Thaddeus Crews fa4d24cbb5 Merge pull request #116513 from deralmas/wl/dedup-global-remove
Wayland: Deduplicate cleanup logic
2026-03-19 10:19:52 -05:00
Lukas Tenbrink 05c33acbb1 Make memnew(RefCounted) return Ref, to force callers to take ownership of it through a reference. 2026-03-18 20:34:08 +01:00
Thaddeus Crews 179ee951b6 Merge pull request #117530 from ArchercatNEO/wp-color-management-warning
Wayland: Only report HDR request failed warning if HDR was actually requested
2026-03-18 11:43:28 -05:00
Rémi Verschelde 4336184ea4 Style: Tweak ordering of thirdparty includes with angle brackets 2026-03-18 10:41:59 +01:00
Rémi Verschelde 98868393cc Style: Enforce #include validation hook 2026-03-18 10:41:59 +01:00
Rémi Verschelde e33e98a26f Style: Apply clang-format grouping rules 2026-03-17 20:11:01 +01:00
ArchercatNEO 5b66760492 Wayland: only emit HDR request failed warning if HDR was actually requested
Fixes #117527
2026-03-17 18:52:38 +00:00
DSOE1024 980639ff6e Fix preprocessor directive for X11 and GLES3 2026-03-17 17:26:24 +08:00
Dery Almas 29e1bc5a23 Wayland: Deduplicate cleanup logic
We now reuse the `global_remove` event handler. This removes a
considerable amount of duplication, minimizes human error (such as
cleaning up a global in one place but not the other), and helps test the
dynamic global removal logic.
2026-03-16 23:51:08 +01:00
Thaddeus Crews 5d0a321575 Merge pull request #102987 from ArchercatNEO/wayland-hdr
[LinuxBSD] Add support for HDR output (Wayland)
2026-03-16 11:32:54 -05:00
Rémi Verschelde 005e054245 Remove unused includes in editor with clangd-tidy
Also includes the few changes flagged in `main`.
2026-03-15 20:47:05 +01:00
Rémi Verschelde 0d7bd115da Remove unused includes in drivers with clangd-tidy 2026-03-14 22:38:02 +01:00
Rémi Verschelde d9b81615e5 Remove unused includes in platform with clangd-tidy
Handled Linux, Windows, Android, and (partially) Web.
2026-03-14 22:37:05 +01:00
ArchercatNEO eee3384e20 HDR output for linuxbsd (wayland) 2026-03-13 16:48:58 +00:00
Dery Almas eb680bc8c3 Wayland: Improve mapping robustness and synchronization
We assumed that a window will be ready after a single roundtrip but
that's actually not guaranteed by the XDG shell protocol.

This patch waits for an arbitrary timeout (10s) before erroring out and
forcefully closing the window. Since this exercised quite some code
paths, it also reworks some window handling logic and fixes a bunch of
synchronization issues.
2026-03-13 08:25:04 +01:00
Thaddeus Crews 075d6f27f1 Merge pull request #117313 from bruvzg/no_dyn
Remove AccessKit dynamic wrappers, add download script and build warning if libs are missing.
2026-03-11 15:41:31 -05:00
Pāvels Nadtočajevs dd0387fcb0 Remove AccessKit dynamic wrappers, add download script and build warning if libs are missing. 2026-03-11 14:52:38 +02:00
scgm0 cfe79907af Fix unable to compile linux template_release 2026-03-11 18:59:38 +08:00
Rémi Verschelde e015e8bde4 Remove unused includes in core with clangd-tidy 2026-03-11 06:41:36 +01:00
Yyf2333 282e4544b0 Split VariantCaster from binder_common.h 2026-03-10 17:59:33 +08:00
A Thousand Ships 68cec996d3 [Linux] Fix addr2line call 2026-03-04 18:53:01 +01:00
Thaddeus Crews 0f0c3f3a18 Merge pull request #115566 from bruvzg/add2line_
[Linux/BSD] Prefer `gimli-rs/addr2line` or `llvm-addr2line` over binutils.
2026-03-04 11:20:47 -06:00
Rémi Verschelde eabb9a63d4 Rename callable_method_pointer.h to callable_mp.h and include it explicitly
This allows removing it from `class_db.h`, significantly reducing the amount of files
that include it transitively.

Also includes some include cleanup in `control.h` and `rich_text_label.h` done while
ensure they don't depend on `callable_mp`.
2026-03-04 16:23:23 +01:00
Rémi Verschelde 727b06a79f Move ProcessID typedef out of OS
This allows decoupling a number of files from `os.h`.
2026-03-04 15:00:45 +01:00
Pāvels Nadtočajevs ee1a64a4ad [Linux/BSD] Prefer gimli-rs/addr2line or llvm-addr2line over binutils. 2026-03-04 14:17:48 +02:00
Rémi Verschelde f332faf46b Explicitly include core/os/os.h where used 2026-03-04 09:54:10 +01:00
Rémi Verschelde 8c0f175c94 Decouple RenderingServer from as much of the codebase as possible
Notably decouples it from:
- AccessibilityServer
- DisplayServer
- Viewport
- Window
2026-03-03 12:48:07 +01:00
Rémi Verschelde a447ac95ec Move DisplayServer enums and typedefs to DisplayServerEnums
This will allow decoupling `display_server.h` from a number of headers in the
codebase which only require those enums and not all the DisplayServer API.
2026-03-03 12:44:02 +01:00
Pāvels Nadtočajevs 1306221592 Move accessibility methods/enums from DisplayServer to the AccessibilityServer dedicated singleton. 2026-03-02 13:48:29 +02:00
StarryWorm 357fa00a4a rm class_db.h from resource.h 2026-02-27 19:08:29 -05:00
Rémi Verschelde f5a290ac46 Move RenderingServer enums to a dedicated RenderingServerEnums (RSE) namespace
A number of headers in the codebase included `rendering_server.h` just for
some enum definitions. This means that any change to `rendering_server.h` or
one of its dependencies would trigger a massive incremental rebuild.

With this change, we decouple a number of classes from `rendering_server.h`,
greatly speeding up incremental rebuilds for that area.

On my machine, this reduces incremental compilation time after an edit of
`rendering_server.h` by 60s (from 2m57s).
2026-02-25 19:43:03 +01:00
Lukas Tenbrink e9465cd380 Move variant pools to their own compile unit. 2026-02-21 13:24:17 +01:00
Thaddeus Crews 15558cb886 Merge pull request #108111 from Repiteo/core/sanitizer-restructure
Core: Restructure sanitizers
2026-02-18 12:04:30 -06:00
Rémi Verschelde ad4b910a10 Minimize include dependencies of display_server.h
- Removes `native_menu.h` dependency from `display_server.h`.
  It's now forward-declared in all DisplayServer implementations and should
  be included in the .cpp's.
- Removes some unused `rb_set.h` and `rb_map.h` dependencies, which leads to
  having to include them explicitly in half the scene and editor codebase...
  which shows how much we depend on `display_server.h`.
- Forward-declare `input_event.h`, so now we need only `keyboard.h`.
2026-02-17 19:45:31 +01:00
Thaddeus Crews a82e210b5a Merge pull request #116376 from deralmas/wl/noope
Wayland: Skip resize request when the size is the same
2026-02-17 09:28:23 -06:00
Dery Almas 870631211f Wayland: Skip resize request when the size is the same
`DisplayServer::window_set_size` is called lots of times in the code,
with the assumption (I suppose) that it's going to be idempotent.

We had checks in _update_window_rect but we still called
`WaylandThread::window_set_size`, which did a lot of stuff. In
particular, this caused issues with HiDPI as it "overrode" the window
size before it had a time to figure out its scale.
2026-02-16 20:10:54 +01:00
Thaddeus Crews 41f4ca3247 Merge pull request #116236 from deralmas/the-chosen-one
Wayland: Only handle the current output mode
2026-02-16 10:19:35 -06:00
Thaddeus Crews b769ae2d5f Merge pull request #116309 from deralmas/wl/sdrawkcab
Wayland: Swap backward and forward mouse buttons
2026-02-16 10:19:30 -06:00
Thaddeus Crews 4106b5cdcc Merge pull request #116256 from dsnopek/monado-opengl-fix
OpenXR: Fix OpenGL initialization with Monado on X11
2026-02-16 10:19:28 -06:00
Thaddeus Crews 2762c56829 Merge pull request #112287 from Kiisu-Master/wl_pointer_warp
Add pointer warping on wayland
2026-02-16 10:19:18 -06:00
Kiisu_Master 4dceee5252 Add pointer warping on wayland 2026-02-15 18:16:27 +01:00
Dery Almas fe0acc1003 Wayland: Swap backward and forward mouse buttons
They were bound in reverse. No idea how I originally chose which was
which.

This patch also orders the switch cases by their underlying codes: left,
right, middle, side, extra.
2026-02-15 09:28:52 +01:00
David Snopek 3f5c5d969f OpenXR: Fix OpenGL initialization with Monado on X11 2026-02-13 11:58:27 -06:00
Dery Almas dc8e7ef2ce Wayland: Only handle the current output mode
Some compositors (e.g. COSMIC) can report *all* supported output modes,
not just the current mode. This is valid, albeit deprecated, so let's
add a check and ignore any non-current output events.
2026-02-13 02:52:40 +01:00
Skyth 8fbf2f1e14 Reduce includes to rendering device.
Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2026-02-10 16:58:50 +03:00
Thaddeus Crews 435e6c3830 CI: Enable Ruff preview options; bump version
• 1.14.7 → 1.15.0
2026-02-05 12:20:10 -06:00
Thaddeus Crews 0aa77895ac Merge pull request #114521 from mxtherfxcker/fix/ui-freezes-when-opening-file-manager-on-linux
LinuxBSD: Fix UI freeze when opening file manager
2026-02-05 09:32:38 -06:00
Thaddeus Crews 65e79f33cb Merge pull request #115823 from deralmas/what-the-fd
Wayland Embedder: Fix FD leak with inert objects
2026-02-05 09:32:34 -06:00