Commit graph

26 commits

Author SHA1 Message Date
Jente Hidskes
a53dca91ce Render popups separately from their toplevel view when possible 2020-01-11 17:07:33 +01:00
Jente Hidskes
1c59946e20
Rename view_damage_surface to view_damage_part
To better align it with its counterpart view_damage_whole
2019-12-29 22:54:25 +01:00
Jente Hidskes
95b7782c72
Be explicit about output- and layout coordinates 2019-12-29 16:07:14 +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
Drew DeVault
9354781f32 Update to wlroots 0.6.0 2019-05-03 21:03:09 +02:00
Jente Hidskes
2166fbdcfb Implement xdg-decoration
This commit adds a commandline switch (-d) to disable client side
decorations, if possible. In this case, Cage will not draw any
decorations of its own, in order to maximize screen real estate.

The default behavior remains the same, i.e., if -d is not passed,
clients will draw their client side decorations, if any.

Fixes #32
2019-02-21 09:14:59 +01:00
Jente Hidskes
2669c80803 Listen to fullscreen requests
Fixes #34.
2019-02-16 00:36:07 +01:00
Jente Hidskes
a114ddbbf3 Damage whole views on map and unmap 2019-02-16 00:35:17 +01:00
Jente Hidskes
aa4b27ec20 xdg_shell: implement xdg_popup 2019-02-16 00:35:17 +01:00
Jente Hidskes
e981cb8a1c Implement damage tracking
Fixes #5.
2019-02-16 00:35:17 +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
7175100d0d view: reorder functions
It had gotten a bit messy. Now functions are grouped together (i.e.,
getters, queries, etc).
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
f25460f365
xdg_shell/xwayland: include respective header 2019-01-25 20:34:11 +01:00
Jente Hidskes
e9139f08e3
xdg_shell/xwayland: unlink listeners on destroy 2019-01-25 16:27:51 +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
a8e15442ab
xdg_shell/xwayland: do not check parent for other view types
An xdg-shell surface can never be a parent of an xwayland surface and
vice-versa.
2019-01-18 17:37:40 +01:00
Jente Hidskes
b0bd4e680d view: add view_has_children to query if a view has children
This allows us to check per-view whether is has dialogs open, instead of
diong it on a global basis as we are doing currently. This is necessary
for fully supporting multiple primary clients.
2019-01-12 19:27:24 +01:00
Jente Hidskes
f47a76c9be
xdg_shell: only track toplevel xdg surfaces
We don't need to manage popups, but in
786e28bdac we ended up doing so. This
reverts Cage's behavior.
2019-01-04 13:41:25 +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
9a99ba604f
Output: abstract away a view switch statement
We have our view abstraction, so why not use it?
2019-01-02 21:23:16 +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
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