Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #204 from djpohly/scenegraph3
Browse files Browse the repository at this point in the history
merge scenegraph3
  • Loading branch information
sevz17 authored Mar 20, 2022
2 parents 1dfd867 + dd463b2 commit 4493205
Show file tree
Hide file tree
Showing 3 changed files with 188 additions and 379 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ dwl is not meant to provide every feature under the sun. Instead, like dwm, it s
- Various Wayland protocols
- XWayland support as provided by wlroots (can be enabled in `config.mk`)
- Zero flickering - Wayland users naturally expect that "every frame is perfect"
- Layer shell popups (used by Waybar)
- Damage tracking provided by scenegraph API

Features under consideration (possibly as patches) are:

- Protocols made trivial by wlroots
- Implement the input-inhibitor protocol to support screen lockers
- Implement the idle-inhibit protocol which lets applications such as mpv disable idle monitoring
- Layer shell popups (used by Waybar)
- Basic yes/no damage tracking to avoid needless redraws
- More in-depth damage region tracking ([which may improve power usage](https://mozillagfx.wordpress.com/2019/10/22/dramatically-reduced-power-usage-in-firefox-70-on-macos-with-core-animation/))
- Implement the input-inhibitor protocol to support screen lockers (see https://github.com/djpohly/dwl/pull/132)
- Implement the idle-inhibit protocol which lets applications such as mpv disable idle monitoring (see https://github.com/djpohly/dwl/pull/133)
- Implement the text-input and input-method protocols to support IME once ibus implements input-method v2 (see https://github.com/ibus/ibus/pull/2256 and https://github.com/djpohly/dwl/pull/12)

Feature *non-goals* for the main codebase include:
Expand Down
20 changes: 20 additions & 0 deletions client.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,26 @@ client_surface_at(Client *c, double cx, double cy, double *sx, double *sy)
return wlr_xdg_surface_surface_at(c->surface.xdg, cx, cy, sx, sy);
}

static inline void
client_min_size(Client *c, int *width, int *height)
{
struct wlr_xdg_toplevel *toplevel;
struct wlr_xdg_toplevel_state *state;
#ifdef XWAYLAND
if (client_is_x11(c)) {
struct wlr_xwayland_surface_size_hints *size_hints;
size_hints = c->surface.xwayland->size_hints;
*width = size_hints->min_width;
*height = size_hints->min_height;
return;
}
#endif
toplevel = c->surface.xdg->toplevel;
state = &toplevel->current;
*width = state->min_width;
*height = state->min_height;
}

static inline Client *
client_from_popup(struct wlr_xdg_popup *popup)
{
Expand Down
Loading

0 comments on commit 4493205

Please sign in to comment.