aboutsummaryrefslogtreecommitdiff
path: root/tinywl/tinywl.c
AgeCommit message (Collapse)Author
2021-11-18tinywl: autocreate allocator and init outputSimon Zeni
2021-10-02Fix spelling errorsElyes HAOUAS
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2021-08-20tinywl: simplify logic for sending pointer eventsIsaac Freund
2021-04-19Stop specifying xkb_rule_namesSimon Ser
If a NULL xkb_rule_names pointer is passed to xkb_keymap_new_from_names, libxkbcommon will default to reading the XKB_* env variables. So there's no need to do it ourselves. Also s/xkb_map_new_from_names/xkb_keymap_new_from_names/ since the latter is more consistent with the returned struct name. [1]: https://xkbcommon.org/doc/current/structxkb__rule__names.html
2021-01-07tinywl: fix wlr_backend_autocreate callSimon Zeni
2020-11-11Replace wlr_key_state with wl_keyboard_key_stateIsaac Freund
There's no reason to have duplicate enums
2020-04-28tinywl: Fix wrong anchor point while resizing a windowGreg Depoire--Ferrer
Previously, when dragging the left border of a window with the mouse in tinywl, there was a bug where it snap the top level surface's geometry X coordinate directly to the position of the mouse, as if you started the resize right on the border. This also affected the other (right, top and bottom) borders. I think that the previous resize code was hard to understand. Honestly I have not spent a lot of time trying to understand why it didn't work and I wrote another resize algorithm instead: now, instead of working directly with widths and heights which are complicated, we work with the borders (left, right, top, bottom). This is easier to understand IMO. Note: I originally fixed this [in the waybox compositor](https://github.com/wizbright/waybox/pull/23) but then I realized that the code was taken from tinywl and that it had the same issues so I copied my fix for tinywl.
2020-04-28tinywl: handle request set selectionIsaac Freund
2020-04-28tinywl: remove unused variablesIsaac Freund
2020-04-23tinywl: fix geo_box bug in cursor resizingKalyan Sriram
While trying out the tinywl code, I found that the resize mode was behaving weirdly ... so I looked into code. Turns out the `begin_interactive` method stores the cursor position plus the geo_box position; however, `process_cursor_resize` wasn't taking this into account, causing windows to jump down in size unexpectedly when resized and lose alignment with the cursor. To fix this, I simply added a member to the `tinywl_server` struct that stores the geo_box when the mouse enters grab mode, and I referenced that data in the resize method. I considered polling for this data every time instead of storing it in the server struct, but 1) since changes in this value are not relevant and 2) it could potentially decrease performance (I don't know enough about wlroots to know how much) I decided to just store it. I can change this if desired.
2020-04-15tinywl: remove redundant create output global callIsaac Freund
2019-12-30tinywl: enable and commit output when modesettingSimon Ser
While at it, choose the preferred mode instead of the last one.
2019-07-27Remove all wayland-server.h includesSimon Ser
The documentation for wayland-server.h says: > Use of this header file is discouraged. Prefer including > wayland-server-core.h instead, which does not include the server protocol > header and as such only defines the library PI, excluding the deprecated API > below. Replacing wayland-server.h with wayland-server-core.h allows us to drop the WL_HIDE_DEPRECATED declaration.
2019-04-23output: refactor frame submission APISimon Ser
This is necessary for direct scan-out and other upcoming features. This patch changes the output API to look like the wl_surface API. Outputs now have some double-buffered state: the frame to be submitted (currently only wlr_renderer frames are supported) and the damaged region. To attach a pending frame, use wlr_output_attach_render. To set the pending damaged region, use wlr_output_set_damage. To submit the pending state, call wlr_output_commit. This will submit the pending frame to the backend. To migrate from the old API to the new one: - Replace wlr_output_make_current calls by wlr_output_attach_render - Replace wlr_output_swap_buffers calls by wlr_output_set_damage and wlr_output_commit
2019-03-02tinywl: send pointer frame eventsemersion
Fixes https://github.com/swaywm/wlroots/issues/1544
2019-02-26clang compile fix #1572athrungithub
clang consider error no enum handled, in BSD and Linux
2019-01-13Fix software cursor rendering for tinywl and some examplesAlexander Bakker
2019-01-10Remove unused struct from tinywlDrew DeVault
2019-01-10Fix a few typosemersion
2019-01-03Annotate the sourceDrew DeVault
2019-01-03Update READMEs per tinywl mergeDrew DeVault
2018-11-27view_at: remove unused variableLouis Taylor
2018-11-26Correct WLR_BUTTON_PRESSED to WLR_KEY_PRESSEDLouis Taylor
This worked since it was the same value, but results in compile warnings.
2018-08-15Implement Alt+F1 (next window) and Alt+Esc (exit)Drew DeVault
2018-08-15Fix uninitialized variableDrew DeVault
2018-08-15Fix various bugsDrew DeVault
2018-08-15Tiny Wayland compositorDrew DeVault