Commit graph

590 commits

Author SHA1 Message Date
Ottatop
dbccfa9c76 Expose keyboard focus stack to API 2024-05-15 21:24:20 -05:00
Ottatop
4750d7ce26 Don't focus new outputs
Let the pointer do the focusing
2024-05-15 18:46:02 -05:00
Ottatop
17a3fc5a1a Fix pointer focus to layers on non-(0,0) outputs 2024-05-15 18:32:45 -05:00
Ottatop
8dd49c9874 Draw colored background when locking 2024-05-15 17:40:09 -05:00
Ottatop
48167a75c2 Guarantee no windows get drawn when locked 2024-05-15 17:26:36 -05:00
Ottatop
333c805bdd Prevent pointer focus to windows when locked 2024-05-15 17:13:52 -05:00
Ottatop
1faab2a68f Update Smithay 2024-05-15 13:35:03 -05:00
Ottatop
6541f9fda3 Draw cursor when locked correctly 2024-05-14 21:44:59 -05:00
Ottatop
b9c5a88f9f Force keyboard focus on lock surface, don't trigger keybinds when locked 2024-05-14 20:41:10 -05:00
Ottatop
d708fccf58 Implement session lock 2024-05-14 19:35:12 -05:00
Ottatop
42f3e65255 Filter keybind releases 2024-05-13 18:43:17 -05:00
Ottatop
3f6e32e49c Filter windows on active tags for swapping 2024-05-08 22:50:41 -05:00
Ottatop
1592fe2106 Make foreign toplevel maximize actually maximize 2024-05-08 22:36:43 -05:00
Ottatop
2c209856d3 Switch to tag if activated window is not on active tag 2024-05-08 22:25:26 -05:00
Ottatop
a8aa7941d2 Don't expose override redirects 2024-05-08 22:09:57 -05:00
Ottatop
d0212126e9 Raise window on foreign toplevel activate 2024-05-08 22:03:30 -05:00
Ottatop
2c1fc29f87 Expose xwayland windows to foreign toplevel 2024-05-08 21:40:07 -05:00
Ottatop
f8fb8fddfb Add most of foreign toplevel
Xwayland windows don't show up currently
2024-05-08 02:22:24 -05:00
Ottatop
5d3f66a747 Add info subcommand 2024-05-07 22:30:48 -05:00
Ottatop
bb33602724 Use PID in socket name 2024-05-07 20:46:02 -05:00
Ottatop
37b728203c Use reexported rustix instead of nix 2024-05-07 20:28:48 -05:00
Ottatop
fd637d2256 Add some comments 2024-05-07 20:12:55 -05:00
Ottatop
6802afe04a Add socket_dir cli option 2024-05-07 19:39:27 -05:00
Ottatop
b5707daa86 Add logs in places 2024-05-07 19:39:26 -05:00
Ottatop
dc70a8a3e7 Fix builtin config and metaconfig xwayland 2024-05-07 19:39:26 -05:00
Ottatop
7b006596af Uncouple config, backends, and xwayland
wow i love the single responsibility principle
2024-05-07 19:39:26 -05:00
Ottatop
176f559360 Set keyboard focus on open only if on active tag 2024-05-07 19:39:06 -05:00
Ottatop
4291fa47ab Fix tests
Turn off xwayland in tests and if turned on, wait for it to start
2024-05-04 16:16:54 -05:00
Ottatop
9771f4c645 Remove backend/wlcs.rs
The tests don't work yay
2024-05-04 15:31:11 -05:00
Ottatop
b654de8284 Add --no-xwayland option 2024-05-04 15:24:59 -05:00
Ottatop
c0f8328f08 Don't send configure immediately
trust me guys i know what i'm doing haha
2024-05-04 13:25:59 -05:00
Ottatop
404377a1ed Fix out-of-bounds panic 2024-05-03 22:43:59 -05:00
Ottatop
c55a4991c4 Simplify window removal 2024-05-03 00:00:38 -05:00
Ottatop
feeb139b05 Don't focus windows on inactive tags 2024-05-02 23:34:21 -05:00
Ottatop
5afd58fb74 Keep track of modes for API 2024-05-02 23:16:11 -05:00
Ottatop
45ed01dd91 Update xwayland stacking in more places 2024-05-02 22:55:41 -05:00
Ottatop
f48c10c8ef Add ALL the manufacturer names 2024-05-02 22:39:04 -05:00
Ottatop
009dd19dc8 Fix security context restriction being reversed 2024-05-02 16:05:39 -05:00
Leon Vack
80a926f719 Add security-context-v1 2024-05-02 15:21:07 -05:00
Ottatop
a6f98603d5 Fix clippy for CI 2024-05-02 14:48:16 -05:00
Ottatop
5679a295d8 Warp to cursor hint on constraint unlock
Not the greatest implementation performance-wise but an implementation nonetheless
2024-05-01 22:14:48 -05:00
Ottatop
55a0379697 Finalize pointer constraints
While this initial implementation is done and I'm pretty happy with it, there are still 2 problems:
1. The cursor is not warped to the hinted position when a locked pointer constraint is removed. This may require an update to Smithay to expose a `PointerConstraintsHandler::constraint_removed` method.
2. The cursor may jump between two close constraint regions if it's moved fast enough. This can be fixed by possibly doing a ray cast or something.
2024-05-01 19:18:31 -05:00
Ottatop
9382601444 Fix pointer clamping
The previous clamp logic allowed very small pointer motions to break free of pointer constraints at the right and bottom edges
2024-05-01 18:16:11 -05:00
Ottatop
98b4e0aea2 Simplify confined pointer region logic 2024-05-01 14:47:57 -05:00
Ottatop
4b3839e380 Fix pointer clamping regression and also update Smithay 2024-04-27 21:26:54 -05:00
Ottatop
058350db43 Make confined region work
Currently does not work with confines with no region. Also there *might* be a regression that prevents the mouse from moving between outputs, need to test that
2024-04-27 19:13:53 -05:00
Ottatop
1543b64fb8 Add pointer constraints
Needs more work and testing
2024-04-27 17:02:19 -05:00
Ottatop
4eb29c49dc Close layer surfaces on output removal
Fixes mako not making new notifications if one is sent during sleep
2024-04-27 12:51:03 -05:00
Ottatop
8c0bce7191 Separate stuff that took in State
I love me some non-overlapping borrows
2024-04-26 20:25:40 -05:00
Ottatop
b99cc8ffce Move impls to Pinnacle 2024-04-26 19:58:02 -05:00
Ottatop
8aaec59452 Split off backend and rest of State
Currently doesn't clean up anything, still need to change `impl State`s to `impl Pinnacle`s
2024-04-26 18:43:18 -05:00
Ottatop
c9012cf483 Improve logging
Use better env filters, log panics, and make logging to files not use color escapes
2024-04-26 14:56:12 -05:00
Leon Vack
13df2d161b Fix lua tests hanging 2024-04-25 11:07:32 +02:00
Leon Vack
194da9e557 Float all windows for tests and improve window positioning 2024-04-25 10:48:37 +02:00
Leon Vack
0b353c45f2 Use an embedded config for tests 2024-04-25 10:48:37 +02:00
Leon Vack
c0fe55003b Fix xwayland and cleanup 2024-04-25 10:48:37 +02:00
Leon Vack
abb21d9924 Perform wlcs interactions using an InputBackend 2024-04-25 10:48:37 +02:00
Leon Vack
e8b8a33bfc Make wlcs run some actual tests 2024-04-25 10:48:36 +02:00
Leon Vack
7adcb1d729 Make wlcs start 2024-04-25 10:47:48 +02:00
Ottatop
7e80a6a64f Update test infrastructure
Extracts the dummy output name into a const. Unfortunately I still need a way to interpolate that into Lua strings. Also fixes possible hangs when Lua crashes
2024-04-24 21:37:17 -05:00
Ottatop
e2232fb56c Don't add modes with add_mode
Doing so adds non-current modes to the output (which are deprecated) and causes smithay to send them to `wl_output` consumers. Caused swww to open at the wrong size
2024-04-24 20:47:47 -05:00
Ottatop
36a82245a7 Fix tests
Unwrap in tests to check error

Add backtrace to debug tests

Add dbg

i hate this

debugging github actions is a pain

aaaa

aaaaaaaaa

needs to be rebased
2024-04-24 18:33:44 -05:00
Ottatop
ce22883125 Return instead of asserting 2024-04-23 19:41:26 -05:00
Ottatop
45bf9b698c Move state clearing on config start to front 2024-04-22 21:17:51 -05:00
Ottatop
1b09fe94ee Remove luarock from build.rs 2024-04-22 20:45:42 -05:00
Ottatop
ac15e2d566 Fix Rust API not exiting correctly
My goodness was that not fun to debug
2024-04-22 20:34:06 -05:00
Ottatop
43891a2a48 Ignore layout stream errors 2024-04-22 14:14:22 -05:00
Ottatop
f54516bbe3 Embed default rust config
Need to clean up how the Rust API handles shutdown signals
2024-04-21 23:45:03 -05:00
Ottatop
6f6b91f4f8 Use tokio tasks instead of threads
why is the github runner blocking on tests, it doesn't on my machine
2024-04-20 21:25:53 -05:00
Ottatop
314ee5ab6e Commit resize state even if tiled 2024-04-20 12:54:48 -05:00
Ottatop
591c5c1cd0 Update Smithay and don't map resized windows if tiled 2024-04-20 12:54:09 -05:00
Ottatop
a1021638c5 Implement relative pointer protocol 2024-04-19 15:23:56 -05:00
Ottatop
8df5682328 Update internal xwm window layering 2024-04-19 15:02:16 -05:00
Ottatop
e0af7743a4
Merge branch 'main' into api_enhancements 2024-04-18 16:49:23 -05:00
Ottatop
457f0d3d56 Add reload config API call 2024-04-18 16:30:10 -05:00
Ottatop
1c2f639a56 Add tag active signal 2024-04-18 14:42:49 -05:00
Ottatop
d2445afe10 Allo wmatching outputs by EDID serial
Note that EDID serials are not totally unique across all monitors. Also some monitors don't have an EDID serial number. Also this hasn't been tested yet
2024-04-18 11:04:15 -05:00
Ottatop
0284a70c10 Add serial to ouptut properties 2024-04-17 23:01:56 -05:00
Ottatop
5634cbbfe7 Improve Rust output setup API 2024-04-17 18:56:01 -05:00
Ottatop
6c8b643577 Add OutputHandle::set_transform 2024-04-16 21:30:59 -05:00
Ottatop
ce8b56eee8 Add Output::setup
Still needs polishing and more importantly testing, also the Lua impl isn't finished yet
2024-04-15 15:50:09 -05:00
Ottatop
52d05b66b7 Send frames on layout
very hacky no good.
2024-04-13 14:17:49 -05:00
Ottatop
023ebe8a2d Add output resize and move signals 2024-04-12 11:46:52 -05:00
Ottatop
6d78436d18 Add TagHandle::windows 2024-04-12 07:57:22 -05:00
Ottatop
1ba636f39f Bump dependencies 2024-04-12 07:24:37 -05:00
Ottatop
0b70040f62 Position popup on reposition request 2024-04-11 18:17:41 -05:00
Ottatop
8915ef3865 Finish simplifying popup logic 2024-04-11 18:11:43 -05:00
Ottatop
97efdb854c Start simplifying popup logic
So uh when did Smithay have all these popup helpers, did I just not read the docs hard enough
2024-04-11 14:49:30 -05:00
Ottatop
bb01cd9563 Schedule render on popup destroy and x11 window map 2024-04-11 11:12:23 -05:00
Ottatop
a4e1a63efd Remove CropRenderElement from window render elements 2024-04-10 14:02:48 -05:00
Ottatop
4a1a01a5a4 Render overlay layers above fullscreen windows 2024-04-10 13:32:33 -05:00
Ottatop
7ee97f2589 Fail gamma control on output removal 2024-04-10 09:39:33 -05:00
Ottatop
c4d811fd97 Comment useless code for later 2024-04-10 07:44:41 -05:00
Ottatop
9933d64ed2 Fix hang when layer shell nested popup appears
And also some minor changes, also there is a possibility that switching back to the tty Pinnacle is in will lead to a black screen, really need to find a way to reproduce
2024-04-10 07:13:16 -05:00
Ottatop
589b0b135f Update tty switching and apply pending/previous gammas
Bunch more stuff yoinked from Niri
2024-04-10 06:32:52 -05:00
Ottatop
24ac349922 Implement wlr-gamma-control
Buncha stuff yoinked from Niri
2024-04-10 01:55:45 -05:00
Ottatop
76fc825b51 Render everything when there's a fullscreen window
And properly handle input and layering this time
2024-04-07 01:56:36 -05:00
Ottatop
485dba69d6 Revert "Render everything when there's a fullscreen window"
This reverts commit a0aa30fec1.

gj me you failed to realize that now layer surfaces render above
fullscreen windows
2024-04-06 21:21:49 -05:00
Ottatop
a0aa30fec1 Render everything when there's a fullscreen window 2024-04-06 21:06:40 -05:00
Ottatop
bf4e270bfc Bump dependencies 2024-04-06 16:14:45 -05:00
Ottatop
ea932e48ea Only allow floating x11 windows to resize themselves 2024-04-06 16:09:28 -05:00
Ottatop
4ff49385f5 Warn for unwrap in lib 2024-04-04 00:25:17 -05:00
Ottatop
97511b001a Finish winit screencopy 2024-04-04 00:22:46 -05:00
Ottatop
d18d3e4b17 Make dmabuf udev screencopy actually work
Well that wasn't fun. TODO: finish winit screencopy, test all with output transforms
2024-04-03 22:28:29 -05:00
Ottatop
4c41fe1f65 Merge branch 'main' into screencopy 2024-04-01 22:37:07 -05:00
Jörg Sommer
9ff28fc9cd Improve config errors
Co-authored-by: Ottatop <120758733+Ottatop@users.noreply.github.com>
2024-04-01 22:26:51 -05:00
Ottatop
2dbc13d55d Fix screencopy transparency on udev
Using a hack to set the cursor to the primary plane. Also the code is still doodoo
2024-04-01 22:01:46 -05:00
Ottatop
ed2135e8f5 Add almost working screencopy
WARNING: contains digusting and repeated code. Also any screencopy with the cursor included on udev leads to a hole under the cursor
2024-03-31 21:59:45 -05:00
Ottatop
cb4c056cf7 Extract pointer render element creation 2024-03-31 01:01:42 -05:00
Ottatop
7cd7e31397 Scaffold wlr-screencopy
Currently panics if you try to use it. Need to refactor the rendering first
2024-03-30 21:23:01 -05:00
Ottatop
7e1189017b Start config after xwayland starts 2024-03-30 17:50:53 -05:00
Ottatop
15d033d335 Keep track of scale in connector_disconnected 2024-03-29 13:07:48 -05:00
Ottatop
d52192a2ba Default back to linear scaling and add config options to set 2024-03-29 11:57:35 -05:00
Ottatop
7496ebd697 Default to nearest-neighbor upscaling 2024-03-23 18:36:58 -05:00
Ottatop
6a990d45d2 Add logical size to output props, use in set_loc_adj_to 2024-03-23 17:42:05 -05:00
Ottatop
5fbb3e51e9 Add scale to output properties 2024-03-23 16:55:06 -05:00
Ottatop
1907381d99 Add scale setting to Rust API 2024-03-23 16:08:51 -05:00
Ottatop
dfc7a1351e Add scale setting to API, fix fractional scaling 2024-03-23 15:23:00 -05:00
Ottatop
5da0f84350 Set drm mode when resizing output 2024-03-22 21:19:16 -05:00
Ottatop
6adb560e81 Add set mode 2024-03-22 18:58:31 -05:00
Ottatop
2fd98301e6 Add output modes to API 2024-03-22 18:37:27 -05:00
Ottatop
869a2223f5 Add keepalive pings to clients
This should clients to die if the compositor was killed but they weren't dropped
2024-03-22 16:40:06 -05:00
Ottatop
698cd1d973 Correctly parse EDID info
Should fix output make always being Unknown and some cases of the monitor name not being parsed because of a faulty detailed timings parse
2024-03-22 14:27:18 -05:00
Ottatop
13335e9cdd Don't focus popups
Ya know there used to be a commented bit telling me to not set keyboard focus on a popup, and that mysteriously went away and I missed this check
2024-03-22 01:22:37 -05:00
Ottatop
39bf58b41c Keep track of a pending window swap
Prevents windows from getting swapped a bunch of times in one motion causing them not to actually swap
2024-03-21 20:55:02 -05:00
Ottatop
005c787f39 Set keyboard focus to layer surfaces with keyboard exclusivity 2024-03-21 20:18:14 -05:00
Ottatop
0ae090bba5 Add window raising to api 2024-03-21 18:39:27 -05:00
Ottatop
000e3eb2ca Update pointer focus without motion if different 2024-03-21 18:13:16 -05:00
Ottatop
107f4a7ff9 Layout on client unfullscreen request 2024-03-21 17:08:13 -05:00
Ottatop
d41a11347d Fix metaconfig keybinds not working
They were being cleared directly after getting set due to a previous reordering. Oops
2024-03-21 16:43:58 -05:00
Ottatop
5fd8c60f21 Fix minor bugs and do minor cleanup 2024-03-21 16:40:08 -05:00
Ottatop
2880792d9f Schedule render on layout application 2024-03-19 23:40:06 -05:00
Ottatop
86f72c10d5 Partially Revert "Add minor winit improvements"
This partially reverts commit ecd08f6023.
2024-03-19 23:38:22 -05:00
Ottatop
17d0760e43 Add deep copy to copy Lua layouts
This is probably not going to be in the final iteration; I think I might convert all Lua layouts to classes instead of having users deep copy them to change settings
2024-03-16 16:40:47 -05:00
Ottatop
79291d1cd9 Add rust layout docs, adhere to nonexclusive zone 2024-03-15 22:09:27 -05:00
Ottatop
75852551e2 Remove old layout system completely 2024-03-15 21:12:16 -05:00
Ottatop
ab2b3ee13b Add fair layout 2024-03-15 14:02:28 -05:00
Ottatop
e86f242330 Impl Layout.request_layout 2024-03-14 19:42:08 -05:00
Ottatop
e1f2706428 Add layout cycling, dwindle, remove old layout stuff 2024-03-14 19:21:51 -05:00
Ottatop
b3ba9f9393 Add new master stack layout
Currently only this layout for the Lua client works, and there's no cycling layouts yet
2024-03-14 17:31:32 -05:00
Ottatop
13ea0a683b Change TagId back to struct 2024-03-12 19:18:27 -05:00
Ottatop
9f187aba65 Extract window api impls 2024-03-12 19:09:54 -05:00
Ottatop
e3830e9c26 Fix compile errors 2024-03-12 18:40:12 -05:00
Ottatop
9cdb662bbb Don't handle resizes when not resizing 2024-03-11 21:38:24 -05:00
Ottatop
140b0200aa Add some tests
First ever squash no clue what I'm doing
2024-03-11 19:39:41 -05:00
Ottatop
6d83e34868 Setup Lua API integration tests 2024-03-06 18:50:45 -06:00
Ottatop
f4a5328c2c Move all mods into lib
For future testing
2024-03-05 23:25:04 -06:00
Ottatop
ecd08f6023 Add minor winit improvements 2024-03-05 23:14:33 -06:00
Ottatop
8bbb36f512 Rename and move stuff around 2024-03-04 20:38:20 -06:00
Ottatop
d02c138414 Fix focused_window not returning None if no window is focused 2024-03-04 19:34:00 -06:00