No description provided.
feat: RandR, monitor hotplug #1
Merged
romaintb
merged 15 commits from 2026年01月04日 12:09:25 +01:00
feat/RandR into main
romaintb
commented 2025年12月29日 11:39:58 +01:00
romaintb
self-assigned this 2025年12月29日 11:39:58 +01:00
romaintb
added 1 commit 2025年12月29日 11:39:59 +01:00
Move all monitor detection, setup, and hotplug handling from main.zig to monitor.zig to improve code organization and maintainability. - Reduced main.zig from ~1800 to 1220 lines - Created monitor module with init() function for dependency injection - Moved setupMonitors, RandR/Xinerama detection, and hotplug handlers - Updated main.zig to use mon.* function calls - No functional changes, build verified
romaintb
added 1 commit 2025年12月30日 10:58:33 +01:00
please investigate more, the fix looks ugly
romaintb
force-pushed feat/RandR from
to
2025年12月30日 11:44:16 +01:00
Compare
96267e4ef0
f29a6a8349
romaintb
force-pushed feat/RandR from
to
2025年12月30日 12:04:08 +01:00
Compare
f29a6a8349
ce16021d4f
romaintb
added 1 commit 2025年12月30日 17:31:44 +01:00
romaintb
force-pushed feat/RandR from
to
2026年01月02日 19:22:08 +01:00
Compare
8b35621e25
266e0b7a53
romaintb
added 1 commit 2026年01月02日 19:26:24 +01:00
romaintb
added 1 commit 2026年01月02日 19:35:57 +01:00
romaintb
added 2 commits 2026年01月02日 21:28:50 +01:00
Replace unsafe i16 casts with proper i32 handling throughout monitor initialization. Screen dimensions from X11 can exceed i16 range (32767px), which would cause panics. The Monitor struct already uses i32 internally, so accepting i32 parameters in createMonitor() and updateMonitorGeometry() aligns types and eliminates casting risk. Increase maximum supported monitors from 16 to 64, with clear warning messages when the limit is exceeded. This provides visible diagnostics instead of silently dropping additional displays. Remove restrictive validation that rejected large screen dimensions, as this conflicts with the expanded i32 coordinate space. Fix type mismatches in monitor geometry comparisons by removing i16 casts and comparing i32 values directly. Changes: - Change createMonitor/createMonitorRandR to accept i32 coordinates - Change updateMonitorGeometry to accept i32 dimensions - Count connected outputs before allocation for diagnostics - Increase output buffer from 16 to 64 entries - Add warning when output count exceeds maximum - Remove unsafe integer casts at all call sites - Fix i32/i16 type mismatch in geometry comparison logic - Remove screen dimension range validation that was too restrictive
Add proper error checking and diagnostic logging for critical X11 resource initialization failures during setup: - XftDrawCreate: Validate drawable creation and log display/visual/colormap state on failure. Return XftDrawCreationFailed error instead of panicking with a null pointer dereference. - XCreateGC: Check graphics context creation and log error with context creation details. Return GraphicsContextCreationFailed error. - XCreateFontCursor: Validate both bar cursor and root cursor creation. Return CursorCreationFailed error instead of proceeding with invalid cursor (0). These changes prevent crashes from X11 initialization failures and provide clear diagnostic information for debugging display/visual/colormap issues.
romaintb
added 1 commit 2026年01月02日 21:50:18 +01:00
romaintb
added 1 commit 2026年01月03日 10:34:00 +01:00
romaintb
added 1 commit 2026年01月03日 10:34:30 +01:00
romaintb
added 1 commit 2026年01月03日 11:00:45 +01:00
Replace XClearWindow with XFillRectangle to properly clear the root window background when switching to tags with no visible clients. XClearWindow doesn't override existing background pixmaps from the display manager, while XFillRectangle directly draws the background color. Also initialize all monitors during setup() to fix background rendering on the initial tag.
romaintb
added 1 commit 2026年01月03日 11:05:48 +01:00
romaintb
added 1 commit 2026年01月03日 11:14:26 +01:00
romaintb
added 3 commits 2026年01月04日 12:04:55 +01:00
because working on a laptop that has the same resolution as the xephyr window is a PITA
Only dispatch RandR event handling when event type is actually a RandR event. Remove debug logging and the overly broad catch-all handler that would trigger monitor updates on unrecognized RandR subtypes.
romaintb
commented 2026年01月04日 12:09:16 +01:00
unfinished, but let's move on
unfinished, but let's move on
romaintb
merged commit db52743128 into main 2026年01月04日 12:09:25 +01:00
romaintb
referenced this pull request from a commit 2026年01月04日 12:09:25 +01:00
romaintb
deleted branch feat/RandR 2026年01月04日 12:09:25 +01:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
bug
Something is not working
contribution welcome
Contributions are very welcome, get started here
duplicate
This issue or pull request already exists
enhancement
New feature
good first issue
Interested in contributing? Get started here.
help wanted
Need some help
invalid
Something is wrong
question
More information is needed
upstream
Related to an upstream repository, already reported there
No labels
bug
contribution welcome
duplicate
enhancement
good first issue
help wanted
invalid
question
upstream
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
romaintb/rowm!1
Loading...
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/RandR"
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?