Commit graph

41 commits

Author SHA1 Message Date
Jan Tatje
79992f39f3 Add option to allow changing VT
Code that does the VT switch taken from sway.
2020-07-16 14:46:28 +02:00
Jente Hidskes
fc5564645e
seat: remove signals earlier in seat destroy handler (#130)
This fixes a bunch of invalid writes found with valgrind.
2020-02-27 20:39:15 +01:00
Jente Hidskes
9886efa112
seat: log around input device mapping (#128)
This should make it easier to troubleshoot why, for example, a touch
input device isn't mapped to a touch output device. See #126.
2020-02-23 16:00:57 +01:00
project-repo
e96fccfa54
Implement support for wlr_keyboard_group (#123)
* Implement support for wlr_keyboard_group

* Cast pointers to void type when passing to wlr_log

* Fix bracket style

* Improve style

* Remove unnecessary function

* Prefer defined variable for brevity

* Remove unnecessary pointer printing

* Ameliorate style

* Remove duplicate functionality

* Set group repeat info

* Ameliorate style

* Fix bug introduced through renaming

* Ameliorate style in seat.h

* Remove cg_keyboard in favour of cg_keyboard_group

* Remove unused signalling

* Apply clang-format

* Fix ordering of commands

* Remove unnecessary field in cg_keyboard_group
2020-02-21 21:19:12 +01:00
Jente Hidskes
6d0714bfa3 Begrudgingly format wl_list_* macros with a space before parameter list
I can't seem to configure clang-format to remove this space...
2020-02-18 21:20:23 +01:00
Jente Hidskes
6cbc202662 Apply clang-format 2020-02-18 21:20:23 +01:00
Jente Hidskes
42782bda1d
server: remove backend pointer 2020-02-08 16:49:12 +01:00
Jente Hidskes
2db815aa23 Refactor surface damaging and rendering code
This is based on code from Sway, which is also MIT licensed hence
compatible. This makes the surface damaging and rendering code easier to
follow and makes it easier to import future changes to Sway as well.
2020-01-11 17:07:33 +01:00
Jente Hidskes
651d579c30
seat: be explicit about output- and layout coordinates
This commit follows up on 95b7782c72
2020-01-05 13:16:01 +01:00
Jente Hidskes
95b7782c72
Be explicit about output- and layout coordinates 2019-12-29 16:07:14 +01:00
Kenny Levinsen
4e832c6aaf Revert "Set title on outputs that the focused surface is intersecting with"
This reverts commit 915c6df244.
2019-12-26 17:14:57 +01:00
Kenny Levinsen
bcd0086f13 Set title on outputs that the focused surface is intersecting with 2019-12-26 17:14:57 +01:00
Kenny Levinsen
06ada15661 Support multiple outputs
Outputs are arranged in a horizontal layout in the order they are
created in by wlroots. Maximized xdg_shell views will span all outputs,
like the global fullscreen mode in sway.

Fixes #87
2019-12-26 17:14:57 +01:00
Jente Hidskes
0aeba8085c
Replace all wayland-server.h includes with wayland-server-core.h
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.

See also
ca45f4490c (diff-b57e10fe0774258a6d21b22077001cff)
2019-12-20 17:16:53 +01:00
Jente Hidskes
1de6054d7e seat: use XKB_* env vars for configuring keyboard devices
Fixes #66
2019-05-03 21:32:58 +02:00
Tristan Daniel
9e6a5ad44f Cage: implement output transform
This commit adds the command line switch -r, which rotates the output 90
degrees clockwise and can be specified up to three times.
2019-04-14 08:31:33 +02:00
Drew DeVault
da62449c27 Update for wlroots 0.4 2019-02-28 19:24:43 +01:00
Jente Hidskes
707cb2cdfc
seat: fix memory leak when explicitly destroying the seat 2019-02-21 11:35:43 +01:00
Jente Hidskes
76e8be14d9 seat: listen on wlr_seat.events.request_set_selection and wlr_seat.events.request_set_primary_selection
This is now required with wlroots 0.3, see https://github.com/swaywm/wlroots/releases/tag/0.3
and https://github.com/swaywm/wlroots/pull/1402

Fixes #42.
2019-02-16 19:09:00 +01:00
Jente Hidskes
202f74f21a seat: listen on the wlr_cursor.frame event
This is now required with wlroots 0.3, see https://github.com/swaywm/wlroots/releases/tag/0.3
and https://github.com/swaywm/wlroots/pull/1503.
2019-02-16 19:09:00 +01:00
Jente Hidskes
9d825d6dc7
Move set_window_title to output 2019-02-16 00:56:09 +01:00
Jente Hidskes
e981cb8a1c Implement damage tracking
Fixes #5.
2019-02-16 00:35:17 +01:00
Jente Hidskes
f0eb115bda
seat: remove cg_ prefix from cg_seat_destroy 2019-02-02 17:13:10 +01:00
Jente Hidskes
fd5175cbf8 seat: remove cg_ prefix 2019-01-31 14:47:11 +01:00
Jente Hidskes
5c403edc0b view: replace view_has_children with view_is_transient_for
This is a much cleaner implementation but allows us to do the same
things.
2019-01-31 14:47:11 +01:00
Jente Hidskes
64b971a665 view: add proper abstraction with interface 2019-01-31 14:47:11 +01:00
Jente Hidskes
24517922cc view: remove cg_ prefix 2019-01-31 14:47:11 +01:00
Jente Hidskes
c00ac5c462 Set Cage's window title to toplevel's title
When using the Wayland or X11 backend, Cage is drawn inside a window.
This commit sets this window's title to that of the currently focused
toplevel window inside Cage.

Fixes #29.
2019-01-24 16:15:03 +01:00
Jente Hidskes
b6024e982f Fully support multiple primary clients
This is the path we settled on in #24.

That is: any new toplevel window takes over the Cage display, hiding any
previous toplevels until it is closed. Only when the last toplevel is
closed, does Cage exit as well.
2019-01-12 19:27:24 +01:00
Jente Hidskes
112a662ebc Implement support for drag 'n drop icons
Fixes #8.
2019-01-11 15:28:09 +01:00
Jente Hidskes
bf58eadf50 Add idle tracking
Note that this does not do much without an idle manager "on the other
side". See, for example, swayidle: https://github.com/swaywm/sway/blob/master/swayidle/swayidle.1.scd

Fixes #7.
2019-01-09 20:05:09 +01:00
Jente Hidskes
8faf7a2f59
output: render an overlay when dialogs are open
Fixes #6.
2019-01-04 18:33:59 +01:00
Jente Hidskes
ce755c8591
Add touch input
Fixes #1
2019-01-04 15:55:13 +01:00
Jente Hidskes
7077f9ba1c
seat: move desktop_view_at comment 2019-01-03 22:30:55 +01:00
Jente Hidskes
2847e0d54f
Seat: abstract away a view switch statement
We have our view abstraction, so why not use it?
2019-01-02 21:31:30 +01:00
Jente Hidskes
431320443a
seat: reverse conditional for early-exit of set_focus 2019-01-02 21:13:18 +01:00
Jente Hidskes
e721808c88
Update copyright to include 2019 2019-01-02 21:01:01 +01:00
Jente Hidskes
a34c726a1c
Add XWayland support
With Cage becoming more popular since its mention on Phoronix and
therefore getting more use-cases than just my own project, add XWayland
support. The refactoring of 2cf40f7 makes this much easier. Note that
this is a no-cost addition for those of us not using XWayland as it is a
compile-time option that needs to be explicitly enabled by adding
`-Dxwayland=true` to your meson command.
2019-01-02 20:58:48 +01:00
Jente Hidskes
a9818c0df1
Do not display a cursor on output creation
Now we don't display a cursor unless a pointer device is connected.

Fixes #2
2018-12-31 00:55:19 +01:00
Jente Hidskes
fd4ff669dd
Move xcursor theme loading and cursor warping to output
Since this is inherently output independent, we can move this to here
and avoid the inexistance of an output we ran into in the previous
commit.

Warping the cursor is no problem here either: since we restrict
ourselves to a single output, there won't be any confusing UX by having
the cursor jump from one output to the newly attached one.
2018-12-31 00:25:37 +01:00
Jente Hidskes
2cf40f7a9b
Refactor cage into separate source files
This makes Cage much easier to maintain. Not only is it easier where to
look and to maintain a mental model of the code, there is also more
encapsulation, better abstractions and better extendability.
2018-12-31 00:12:33 +01:00