Commit graph

24 commits

Author SHA1 Message Date
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
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
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
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
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
cf439000a5 Prioritize xdg_output for updating window positions
Fixes #46
2024-08-08 01:32:18 -04:00
Shawn Wallace
8892570093 Fix panic when title contains null bytes
Fixes #42
2024-07-22 18:24:21 -04:00
Shawn Wallace
5150791e76 Cargo format 2024-07-07 16:50:28 -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
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
d3a46b7c8a Fix mouse input on outputs not located at 0,0
Possibly addresses #21.
2024-06-30 01:20:02 -04:00
Shawn Wallace
017b683af9 Support globals with higher advertised versions than supported
Fixes launching on Gnome.
2024-06-11 21:44:57 -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
Shawn Wallace
601223d3ae xstate: ignore some more BadWindow errors
Closes #24
2024-05-28 22:31:04 -04:00
Shawn Wallace
02bee5aea7 Support WM_CLASS missing instance and null
Done by AvaloniaILSpy, for some reason
2024-05-24 00:09:28 -04:00
Shawn Wallace
2444c2f07b xstate: Ignore Window/Drawable errors
Sometimes, windows will have actually been destroyed before we even
processed the events for it, so if we try to do something like get
properties on windows (as we do whenever a window is mapped) we will get
an error from the X server, but this is fine - we can just ignore this.

Should fix #16, #20, #22, etc.
2024-05-24 00:06:58 -04:00
Shawn Wallace
3b2698f1de Switch to using xwayland shell protocol over WL_SURFACE_ID
Seems to fix #13. This means a hard requirement on Xwayland 23.1.
2024-05-20 18:51:28 -04:00
Shawn Wallace
2317ebb842 Set input focus on windows without WM_HINTS input flag
Also miscellaneous formatting things.
Part of #8
2024-05-20 01:26:06 -04:00
Shawn Wallace
c1fc38c3d2 Reorganize file layout
Moves satellite to be the root package, also allowing it to be built
by default.
2024-05-17 23:01:57 -04:00