Commit graph

128 commits

Author SHA1 Message Date
Jente Hidskes
431320443a
seat: reverse conditional for early-exit of set_focus 2019-01-02 21:13:18 +01:00
Jente Hidskes
3e10b1f7eb
README: document XWayland compile-time option 2019-01-02 21:13:00 +01:00
Jente Hidskes
9a4afdb025
Make the README for development only
For users, we have Cage's project page at
https://hjdskes.nl/projects/cage.
2019-01-02 21:06:56 +01:00
Jente Hidskes
14dde88d88
Merge pull request #15 from Hjdskes/xwayland
Add XWayland support
2019-01-02 21:02: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
48f8f69556
view_get_geometry: only out width and height
This is the only thing we need, as we don't use a view's x and y
coordinates for placing windows.
2019-01-02 20:47:46 +01:00
Jente Hidskes
786e28bdac
Properly track mapping and unmapping
We shouldn't render a window before it is mapped (obviously), but we
render all windows in the view list. Hence, only insert the window once
it is mapped.

We could run into the case where a window is destroyed without being in
the window list, so we now track unmapping again and remove windows from
the list when they get unmapped.
2018-12-31 20:00:23 +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
Jente Hidskes
e1525a20c8
Do not create a dmabuf global
In new enough wlroots versions, the renderer creates the dmabuf global
itself.

Fixes #11.
2018-12-28 15:32:07 +01:00
Jente Hidskes
f680ee02db
Fix possibly uninitialized variable warning 2018-12-25 20:29:24 +01:00
Jente Hidskes
4ea5cc6b32
Use Wayland's event loop for signals
Now we don't require a global variable.
2018-12-25 20:29:24 +01:00
Jente Hidskes
b22f4b465c
Improve child spawning 2018-12-25 20:29:24 +01:00
Jente Hidskes
96fd0e13bb
Add error handling 2018-12-25 20:29:24 +01:00
Jente Hidskes
3be28b5b6d
Remove unmap support
Since we do not ever minimize or otherwise unmap clients (except when
destroying them), we don't need to track mapped/unmapped state. The
destroy case is captured in checking whether the surface has a buffer
attached to it, before requesting its texture.
2018-12-25 20:29:24 +01:00
Jente Hidskes
11e71dbfb5
Make dialogs modal
That is, do not allow another view to get focus upon clicking a pointer
button.
2018-12-25 20:29:24 +01:00
Jente Hidskes
e68d76f403
Abstract fullscreen view away into a function 2018-12-25 20:29:23 +01:00
Jente Hidskes
0f3ce4a7d8
Remove renderer pointer from server struct 2018-12-25 20:29:23 +01:00
Jente Hidskes
1dcb6355ad
Make pointer visible on startup 2018-12-25 20:29:23 +01:00
Jente Hidskes
95372f3f37
Switch to Meson
This makes it easier to extend in the future. Also, it will make it
easier to add (un)install targets and eventually, distribute files such
as systemd services.
2018-12-25 20:29:23 +01:00
Jente Hidskes
429392ac63
Refactor desktop_view_at 2018-12-25 20:29:23 +01:00
Jente Hidskes
58a9f09617
Handle keyboard removal 2018-12-25 20:29:23 +01:00
Jente Hidskes
92ba822b10
Actually maximize the window.
It appears that wlr_xdg_toplevel_set_maximized does not actually change
the size of the surface. Rather, it only makes the surface think it is
maximized. Hence, we need to set the size to that of the output
manually.
2018-12-25 20:29:23 +01:00
Jente Hidskes
d819eedc62
Allow arguments to be passed to applications 2018-12-25 20:29:23 +01:00
Jente Hidskes
fda8e22d13
Remove support for multiple outputs
A kiosk is only ever attached to a single output.
2018-12-25 20:29:22 +01:00
Jente Hidskes
26d9917160
Initial commit 2018-12-25 20:29:22 +01:00