Commit graph

93 commits

Author SHA1 Message Date
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
45c0556964 Destroy zxdg_toplevel_decoration_v1 object with toplevel
This is a protocol violation and crashes dwl.
On niri it causes the toplevel to "leak".
2025-03-30 11:03:13 -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
467f3014fb Fix surface data unwrap crash in pending activations handling
Fixes #127.
2025-03-22 13:54:03 -04:00
bbb651
1d98ee089c Fix typos 2025-03-20 09:05:24 -04:00
bbb651
180efb0ba9 Support XDG Activation
Test XDG Activation
2025-03-20 09:05:24 -04:00
bbb651
b34b08f004 Reorganize clientside to a single directory 2025-03-20 09:05:24 -04:00
En-En
cca74a5f6b Remove paste dependency
https://rustsec.org/advisories/RUSTSEC-2024-0436.html
2025-03-17 18:03:50 -04:00
Shawn Wallace
beb7c3ebe0 Offset output positions to always have positive coordinates
Honestly, this is something that should probably be fixed in Xwayland itself,
but they don't seem interested in fixing it:
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/395#note_555613

Fixes #15
2025-03-16 16:00:10 -04:00
En-En
f9ec97b007 Make Fixture::drop send a valid exit code ptr to the stream
Found a good way to avoid both an extra function to RunData and make calling `xwayland_exit_code` in other RunData types *less* prone to memory violations. Having a function with a non-empty default implementation being overridden by an empty implementation felt too awkward.
2025-03-15 20:09:40 -04:00
En-En
5bbc4c507a Use and_then over unwrap for rest of surface.data() use
Continues on the #113 fix by eliminating the remaining places the unwrap could occur on
2025-03-15 20:09:40 -04:00
En-En
d4dcee4e8d Add error message if Xwayland dies out of tests & Refactors 2025-03-15 20:09:40 -04:00
Shawn Wallace
0325cb1f48 Add CI 2025-03-13 20:00:13 -04:00
En-En
eab4adc991 Fix most Broken Pipe IO aborts
Makes sure the xwayland_satellite main thread ends so that the file descriptors don't continue to be used after Fixture drops them
2025-03-13 20:00:13 -04:00
Shawn Wallace
f459c604f5 Make integration tests less flaky
- Send sigterm to Xwayland after the test has completed
- Before polling for a new event, try to just grab one from xcb

Fixes #118
2025-03-13 20:00:13 -04:00
Shawn Wallace
caf88fcb45 Force clippy for the whole workspace 2025-03-13 20:00:13 -04:00
Shawn Wallace
3c50b7da79
Add feature request issue template 2025-03-12 01:25:54 -04:00
Shawn Wallace
fb91b57f89 Add bug report template 2025-03-12 01:24:12 -04:00
Shawn Wallace
a33372f61d cargo clippy 2025-03-12 00:58:32 -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
10cb041a80 server: Don't panic on stale wl_pointer ObjectKey
Fixes #113
2025-03-04 21:04:59 -05:00
Shawn Wallace
44590a416d Bump version 2025-02-10 23:08:39 -05:00
Shawn Wallace
a492d2854f cargo and nix update 2025-02-10 23:08:39 -05:00
Shawn Wallace
653391c7c9 server: auto-fullscreen windows that match an output's dimensions
Fixes #93
2025-02-10 23:08:39 -05:00
Shawn Wallace
3944c9a0e4 Update nix flake
Closes #77
2025-01-25 15:38:14 -05:00
Shawn Wallace
3a981c5249 server: don't crash if set_fullscreen fails.
Gotta stop assuming that the X server has my best interests at heart.
Fixes #95
2025-01-25 15:24:11 -05:00
Shawn Wallace
9de1334c0c Update dependencies 2025-01-25 15:16:28 -05:00
Shawn Wallace
8f55e27f63 xstate: always advertise utf8 mime type as UTF8_STRING from Wayland selection
Fixes #87
2025-01-10 00:36:02 -05:00
Shawn Wallace
ba9c1a6a3e cargo fmt + cargo clippy 2025-01-09 00:08:07 -05: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
b699ce62a1 Avoid crashing if entered surface's window is not a known window
Not sure how this even happens, but should fix #88
2025-01-07 21:27:27 -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
En-En
c45c2ed990 fix: add Event::Move check preventing infinite recursion caused by stale surfaces 2024-12-13 13:00:00 -05:00
Shawn Wallace
02f3054626 Log result of systemd notification 2024-11-21 19:01:50 -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
a713cf46cb Bump version 2024-10-28 21:47:45 -04:00
e-tho
4e85e8c69e
Refactor flake for overridability, conditional service install, version formatting (#65)
* Refactor flake for overridability, conditional service install, version formatting

* Disable default cargo features for the flake package

Co-authored-by: sodiboo <37938646+sodiboo@users.noreply.github.com>

* Replace deprecated `--replace` with `--replace-fail` in the flake package

Co-authored-by: sodiboo <37938646+sodiboo@users.noreply.github.com>

* Remove `unstable` from flake package version

Co-authored-by: sodiboo <37938646+sodiboo@users.noreply.github.com>

* Refactor flake to enable dependency overridability

* Pass lib explicitly in flake package

* Fix incorrect package path in flake package dependency

* Replace makeWrapper with makeBinaryWrapper

* Enhance build by separating substitution, service install, and wrapping

* Remove redundant arguments from package call

---------

Co-authored-by: sodiboo <37938646+sodiboo@users.noreply.github.com>
2024-10-27 17:59:15 -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
198ac851ee Cargo update 2024-10-25 01:21:58 -04:00
Shawn Wallace
c77b66cc93 Add tablet support
Closes #47
2024-10-25 01:21:58 -04:00
Shawn Wallace
73ca9c91f1 Replace simple_event_shunt macro with proc macro
This macro is pretty complicated and I needed to add the ability to
clean keywords, so it makes more sense to have this be a proc macro.
2024-10-25 01:21:58 -04:00
Shawn Wallace
b988762955 cargo fmt 2024-10-23 02:29:45 -04:00
Shawn Wallace
dc1f8a753d Use wl_keyboard instead of toplevel state for focus
Rare TODO comment actually done.
Fixes #64
2024-10-23 02:27:46 -04:00