Commit graph

42 commits

Author SHA1 Message Date
Shawn Wallace
13469566b0 Fix Rust 1.89 mismatched_lifetime_syntaxes lint
https://blog.rust-lang.org/2025/08/07/Rust-1.89.0/#mismatched-lifetime-syntaxes-lint
2025-08-14 01:29:17 -04:00
En-En
be9d573fd6 server: make state's client and connection mandatory
The goal of the previous commits being to remove these unwraps. The `unwrap_or_skip_bad_window` changes needed to make a singular debug conditional
2025-08-06 22:32:00 -04:00
En-En
4280639df8 server: give uninitialized and initialized xstate with unique types 2025-08-06 22:32:00 -04:00
Shawn Wallace
e4bb8c3f9d cargo clippy everywhere 2025-07-12 12:32:20 -04:00
skyrelia
ef24bce5d9 Recognize drag and drop window type
Fixes #166
2025-06-29 16:15:20 -04:00
Ivan Molodetskikh
ac391db415 xstate: Set WM_S0 atom at startup
Xwayland waits for this before starting to listen on the -listenfd descriptors
if either -wm or -initfd is set.

- https://gitlab.freedesktop.org/xorg/xserver/-/blob/xwayland-24.1.6/hw/xwayland/xwayland.c?ref_type=tags#L463-472
- https://gitlab.freedesktop.org/xorg/xserver/-/blob/xwayland-24.1.6/hw/xwayland/xwayland.c?ref_type=tags#L300-317
2025-06-07 12:59:01 -04:00
Shawn Wallace
d7bc38e6e7 xstate: mark _NET_WM_WINDOW_TYPE_MENU/TOOLTIP as popups
Fixes #161
2025-05-27 20:01:12 -04:00
Shawn Wallace
572fa4a2bf Add Xsettings support, for setting scaling related settings
This allows for most GTK and Qt apps to be scaled properly.
In the case of mixed DPI, it will default to using the smallest monitor scale.
2025-05-23 23:25:33 -04:00
Shawn Wallace
ec9ff64c1e Mark WM_TRANSIENT_FOR windows as toplevel parents 2025-05-13 00:46:02 -04:00
Shawn Wallace
4671f27282 Use _MOTIF_WM_HINTS to determine if window should be popup
Surely this won't go horribly wrong...
Fixes #155
2025-05-12 23:25:17 -04:00
Shawn Wallace
51300780f8 Allow toplevels to reconfigure themselves 2025-05-11 11:46:29 -04:00
Shawn Wallace
378421d356 xstate: add _NET_WM_STATE{_FULLSCREEN} to _NET_SUPPORTED
Fixes #157
2025-05-11 11:30:54 -04:00
Shawn Wallace
56a681bfec Mark windows with _NET_WM_STATE_SKIP_TASKBAR as popups
Also includes some light refactoring of the popup flow in general
and trimming down some unused code.

I suspect this may cause some windows to unexpectedly become popups when they
otherwise shouldn't, but that's a bridge we'll cross when we get there.

Fixes #110 and #112.
2025-04-27 01:10:55 -04:00
Shawn Wallace
8188df0e70 Force buffers to be unscaled
Satellite will now force Xwayland to always render with the native
display resolution, and just scale surface sizes accordingly. As a result,
applications won't really respect DPI, but this can be adjusted through
the same means as with normal X11.

Part of #28.
2025-04-09 00:32:20 -04:00
bbb651
0559ace758 Support xdg decorations 2025-03-29 23:09:32 -04:00
bbb651
b2613aec05 Fix panic on empty WM_CLASS 2025-03-23 19:40:35 -04:00
bbb651
0fa13c6fb4 input_focus test: verify WmState::Normal on focus 2025-03-22 15:25:48 -04:00
bbb651
9d751ec063 Fix black screen on minimize
Thanks @UjinT34 for the hint

Fixes #54.
2025-03-22 15:25:48 -04:00
bbb651
180efb0ba9 Support XDG Activation
Test XDG Activation
2025-03-20 09:05:24 -04:00
Shawn Wallace
7df3daba70 Remove ExtraData type from XConnection trait
This was being used to pass the X11 atoms all over the place, but I
realize this is no longer necessary - we can just pass them directly to
our RealConnection when creating it.
2025-03-12 00:55:39 -04:00
Shawn Wallace
54a7ad9e13 server: Unmap popup on popup_done event
Seems some applications don't expect their popups to be unmapped without
their consent, so they make act strangely, but at least it doesn't
crash.
Fixes #117
2025-03-12 00:47:26 -04:00
Shawn Wallace
47e7357eab xstate: refactor clipboard selections
Before, every time the clipboard selection changed, satellite would copy
everything on it and force itself to be the clipboard owner, regardless
of X11 or Wayland. Now, satellite is only the owner when the clipboard
owner comes from Wayland, and uses the XFixes extension to watch for
changes in clipboard ownership X11 side. Satellite also now avoids
copying all of the clipboard contents into memory every time, instead
copying directly on request. This is a pretty big change, but should
hopefully help make the clipboard more stable.

Also added some misc test cleanup/using helper functions where possible.
Using the XFixes extension may also end up being necessary for
implementing drag and drop, so it's good the infrastructure is there
now.
2025-01-08 23:57:22 -05:00
Shawn Wallace
42ffd06d1e xstate: avoid crashing if setting fullscreen state fails
Could be triggered by spamming alt+z with gpu-screen-recorder-ui.
2025-01-07 21:41:28 -05:00
Shawn Wallace
94da1af753 Handle INCR selections properly
Closes #82
2024-12-20 20:46:04 -05:00
Shawn Wallace
03a53b6ad7 Set primary output when window focused
Closes #80
2024-12-18 01:49:55 -05:00
Shawn Wallace
3e6f892d20 Avoid processing events from a reparented window
Should fix #71
2024-11-08 22:37:34 -05:00
Shawn Wallace
b0ee6db9fa Unfocus window on X11 side when keyboard focus is lost
Closes #69 (nice)
2024-10-29 23:24:44 -04:00
Shawn Wallace
67efa2c559 Kill clients missing WM_DELETE_WINDOW protocol on close
Allows the compositor to close glxgears and other similar apps.
2024-10-25 02:40:33 -04:00
Shawn Wallace
ab2d09962c Make WL_SURFACE_ID error message clearer for user 2024-10-17 00:23:21 -04:00
Shawn Wallace
b962a0f33b Don't use MULTIPLE target atom for getting selections
The ICCCM claims this is a "required" target for selection owners,
however several GTK clients (zenity, winecfg) don't seem to support it.
(So much for required.) Just manually grab all the supported targets
individually from the selection owner instead.
Fix for #50
2024-09-15 01:28:32 -04:00
Shawn Wallace
8892570093 Fix panic when title contains null bytes
Fixes #42
2024-07-22 18:24:21 -04:00
galister
054af2a1f7
do not panic if focus_window fails (#39)
Some windows don't take well to being focused, but it doesn't matter that much.
---------

Co-authored-by: Shawn Wallace <yungwallace@live.com>
2024-07-16 18:12:58 -04:00
Shawn Wallace
3140b7c83e Replace references to "exwayland" with "satellite"
Exwayland was the original working name for the project, but satellite
is way cooler.
2024-07-07 17:07:39 -04:00
Shawn Wallace
03a0e1754d Unconditionally set input focus on activation
Wine windows had WM_HINTS.input set to False, and expected use of the
WM_TAKE_FOCUS protocol, but Wayland input is much more absolute, so this
protocol is useless to us. Always focusing windows seems to be fine, so
just do that.
Should fix #35.
2024-07-07 16:50:28 -04:00
Shawn Wallace
d32eae139d Avoid exposing mime types that couldn't be read from through clipboard
Attempts to address #27
2024-07-04 17:55:49 -04:00
Shawn Wallace
98a81c2668 Support repositioning mapped popups
Requires xdg_wm_base version 3+. Helps make some Steam popups act more
consistently.
2024-07-04 16:02:35 -04:00
Shawn Wallace
ece5d1bd10 Actually properly offset popups on offset outputs
Also update window positions when output positon changes.
2024-07-04 14:57:07 -04:00
Shawn Wallace
d8a9c28fa7 Fix hover when focus is different from hover window
Fixes #14
2024-06-30 02:45:31 -04:00
Shawn Wallace
d3a46b7c8a Fix mouse input on outputs not located at 0,0
Possibly addresses #21.
2024-06-30 01:20:02 -04:00
galister
f261e3feec Fix panic when WM_NAME or NET_WM_NAME has invalid UTF-8 2024-06-15 01:09:07 -04:00
Shawn Wallace
b6d281967c Update dependencies and bump version 2024-06-12 00:16:18 -04:00
Shawn Wallace
5e7f2df05e Sync clipboard between X11 and Wayland
You would not believe how much work this was.
Closes #23
2024-06-06 22:41:19 -04:00
Renamed from src/xstate.rs (Browse further)