WIP: Wayland: window resize #1441
No reviewers
Labels
No labels
CI
all
basisu
blog
bug
build
contributor-friendly
core
correctness
deferred
dev
direct3d-headers
docs
driver-os-issue
duplicate
dxcompiler
editor
examples
experiment
feature-idea
feedback
flac
freetype
gamemode
gkurve
glfw
gpu
gpu-dawn
harfbuzz
help welcome
in-progress
infrastructure
invalid
libmach
linux-audio-headers
long-term
mach
mach.gfx
mach.math
mach.physics
mach.testing
model3d
needs-triage
object
opengl-headers
opus
os/linux
os/macos
os/wasm
os/windows
package-manager
priority
proposal
proposal-accepted
question
roadmap
slipped
stability
sysaudio
sysgpu
sysjs
validating-fix
vulkan-zig-generated
wayland-headers
website
wontfix
wrench
www
x11-headers
xcode-frameworks
zig-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hexops/mach!1441
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fnzr/wayland-resize"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is more of a proof of concept implementation, because I need to clarify a couple things first:
try core.initWindow(window_id);call. Otherwise, the resizing logic tries to swap the framebuffer before it's ready, crashing the program.I don't know if this is a viable solution, but if not, we need another way to check if
core.initWindowwas already called.Working example, there's no changes required on userland:
https://github.com/user-attachments/assets/83e24b20-99a6-4081-bbc7-177a764ffc5f
Moved the
c.xdg_toplevel_set_title(wl.toplevel, @ptrCast(core_window.title));call to before the first commit of surface. This allows the window to have a title in creation, allowing compositor to match window rules immediately. This fixes the initial window size problem I was having.Also added the app_id field on the window, allowing the user to provide a XDG application id to the window. I only made it work on Wayland. I can create a different PR with this feature only if more appropriate.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.