* fix: track explicit workspace assignments to prevent X11 configure overwrites
Instead of only checking for special workspaces, track when workspaces are
explicitly assigned via window rules or user actions (movetoworkspace).
This prevents onX11ConfigureRequest from overwriting any explicit workspace
assignment based on window position.
Changes:
- Add m_workspaceExplicitlyAssigned flag to CWindow
- Set flag when window rules assign workspace
- Set flag when user moves window via dispatcher
- Check flag in onX11ConfigureRequest instead of just special workspace
- Add debug logging for explicit workspace assignments
* fix: simplify X11 configure request handling for special workspaces
X11 apps send configure requests with positions based on XWayland's
monitor layout, which could incorrectly move windows off special
workspaces.
Skip workspace reassignment when the window is on a special workspace
or staying on the same monitor, but always run z-order, fullscreen flag,
and damage logic since the configure request may include geometry changes.
* fix: handle fullscreen windows on special workspaces
inFullscreenMode() only checked m_activeWorkspace, missing fullscreen
windows on special workspaces. This caused crashes and incorrect
behavior when fullscreen windows were on special workspaces.
Changes:
- inFullscreenMode() now checks special workspace first since it
renders on top of regular workspaces
- Added getFullscreenWindow() helper to safely get fullscreen window
from either active or special workspace
- Updated callers (shouldSkipScheduleFrameOnMouseEvent, Renderer,
getFSImageDescription) to use the new helper
- Reset m_aboveFullscreen for layer surfaces when opening, closing,
or stealing special workspaces between monitors
* test: add special workspace fullscreen detection tests
Add tests for the new special workspace fullscreen handling introduced
in the previous commit. The tests cover:
1. Fullscreen detection on special workspace - verifies that a window
made fullscreen on a special workspace is correctly detected
2. Special workspace fullscreen precedence - verifies that when both
regular and special workspaces have fullscreen windows, the special
workspace window can be focused when the special workspace is opened
3. Toggle special workspace behavior - verifies that toggling the
special workspace off properly hides it and returns focus to the
regular workspace's fullscreen window
These tests exercise the key code paths modified in the fix:
- inFullscreenMode() checking special workspace first
- getFullscreenWindow() helper returning correct window
- Layer surface m_aboveFullscreen reset on special workspace toggle
* format: add internal formats for drm formats
cross referenced with weston and added internal formats and types for a
lot of missing ones. also added a isFormatYUV helper.
* framebuffer: ensure we use right internalformat
ensure we use the right internal format to avoid internal driver
blitting, also since we only attach the GL_STENCIL_ATTACHMENT we might
just aswell only use the GL_STENCIL_INDEX8 to not confuse drivers that
we want a depth aswell.
* texture: use external on yuv or non linear mods
using external makes us use the gpu's internal detiler.
and this is makes intel a lot happier then having to format convert it
to a linear format internally.
* shaders: add external support to CM frag
add external support to CM frag, and correct ext.frag typo.
* formats: remove duplicates and fix a typo in cm.frag
remove duplicate formats and a typo in cm.frag
* formats: add swizzle logic to all formats
add swizzle logic from weston for all formats and use it in shm texture
paths.
* format: more format changes
use monitor drm format instead of forcing something different.
* shader: remove external from cm.frag
drivers want this resolved at compiletime cant use both
samplerExternalOES and sampler2d and then runtime branch it.
* screencopy: swizzle textures in screencopy
swizzle textures in screencopy, to get the right colors when copying.
* screencopy: restore old behaviour
try restore old behaviour before the gles3 format changes.
glReadPixels had the wrong format, so i went to far trying to mitigate
it. should be like before now.
* Add parent-death handling for BSDs
prctl() is a system call specific to Linux. So we cannot use it on BSDs.
FreeBSD has a system call procctl() which is similar to prctl(). We can
use it with PROC_PDEATHSIG_CTL.
OpenBSD, NetBSD, and DragonFly BSD do not appear to have a similar
mechanism. So intead of relying on a system call, we need to manually
poll ppid to see if the parent process has died.
With the changes, the spawned Hyprland process is terminated when the
launcher process exits, matching Linux behavior as closely as possible
on BSD platforms.
* Remove ppid polling on OpenBSD, NetBSD, and DragonFly BSD
* framebuffer: dont release if format or size changes
we dont have to release and recreate both the texture and framebuffer if
size or format changes, we can just bind the texture and call glTexImage2D
with the new format and size.
* framebuffer: set the alloced viewport size
if monitor size mismatch with the allocated m_size its going to set a
mismatched viewport and cause rendering issues. and if they are
mismatching there is a missing alloc call.
* renderbuffer: cleanup unneded binds
the renderbuffer is attached to the fbo and trying to rebind it in
bind() is causing unnecessery state changes, just bind the fbo.
add safeguard in the destructor, the constructor can return early on
failure and leave m_rbo empty or m_image as EGL_NO_IMAGE_KHR.
* hyprerror: fix horizontal overflow and damage box
* hyprerror: remove redundant m_queued preservation logic
The logic to save and restore m_queued into a temporary string 'q' was redundant because m_queued is explicitly cleared at the end of createQueued() (line 164). Restoring it to a non-empty state would cause createQueued() to be called every frame in draw(), which is not the intended behavior for the static error bar.
* Fixes style