mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-11-03 20:02:23 +00:00
Compare commits
38
Commits
0.9
..
wlroots-next
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d16962424 | ||
|
|
7622bd3187 | ||
|
|
12a5856427 | ||
|
|
4ecb2a9df5 | ||
|
|
4953b7ea0c | ||
|
|
9dfaea2f79 | ||
|
|
afbafd53ab | ||
|
|
4ff9db2c40 | ||
|
|
d3fa32993c | ||
|
|
f08d8b3913 | ||
|
|
90e7c722e9 | ||
|
|
e2038450f2 | ||
|
|
4fd683cc84 | ||
|
|
d29259c26a | ||
|
|
fccce97448 | ||
|
|
d9ddaba762 | ||
|
|
5af5dd5e7e | ||
|
|
d3d4da3bd2 | ||
|
|
f1675a4800 | ||
|
|
a75ca79630 | ||
|
|
87029e21c0 | ||
|
|
a514a928e4 | ||
|
|
242ffd7a75 | ||
|
|
f22c223cbf | ||
|
|
b83881f881 | ||
|
|
fa400c5d3d | ||
|
|
40b0ae76ae | ||
|
|
2a567195e6 | ||
|
|
cc23250527 | ||
|
|
88c0c68d59 | ||
|
|
d41ecb745c | ||
|
|
52c4fb58ec | ||
|
|
38c7bd7ee8 | ||
|
|
6e1bfa86c7 | ||
|
|
e32535cf97 | ||
|
|
f4249db613 | ||
|
|
b2d2b701d7 | ||
|
|
2c9cb2af1b |
@@ -153,6 +153,7 @@ given the base on which it is built. Implemented default features are:
|
||||
- Support screen lockers via ext-session-lock-v1 protocol
|
||||
- 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
|
||||
|
||||
|
||||
@@ -189,6 +189,7 @@ client_get_geometry(Client *c, struct wlr_box *geom)
|
||||
}
|
||||
#endif
|
||||
*geom = c->surface.xdg->geometry;
|
||||
geom->x = geom->y = 0;
|
||||
}
|
||||
|
||||
static inline Client *
|
||||
@@ -257,48 +258,6 @@ client_is_float_type(Client *c)
|
||||
(min.width == max.width || min.height == max.height));
|
||||
}
|
||||
|
||||
static inline int
|
||||
client_is_rendered_on_mon(Client *c, Monitor *m)
|
||||
{
|
||||
/* This is needed for when you don't want to check formal assignment,
|
||||
* but rather actual displaying of the pixels.
|
||||
* Usually VISIBLEON suffices and is also faster. */
|
||||
struct wlr_surface_output *s;
|
||||
int unused_lx, unused_ly;
|
||||
if (!wlr_scene_node_coords(&c->scene->node, &unused_lx, &unused_ly))
|
||||
return 0;
|
||||
wl_list_for_each(s, &client_surface(c)->current_outputs, link)
|
||||
if (s->output == m->wlr_output)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
client_is_stopped(Client *c)
|
||||
{
|
||||
int pid;
|
||||
siginfo_t in = {0};
|
||||
#ifdef XWAYLAND
|
||||
if (client_is_x11(c))
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
wl_client_get_credentials(c->surface.xdg->client->client, &pid, NULL, NULL);
|
||||
if (waitid(P_PID, pid, &in, WNOHANG|WCONTINUED|WSTOPPED|WNOWAIT) < 0) {
|
||||
/* This process is not our child process, while is very unlikely that
|
||||
* it is stopped, in order to do not skip frames, assume that it is. */
|
||||
if (errno == ECHILD)
|
||||
return 1;
|
||||
} else if (in.si_pid) {
|
||||
if (in.si_code == CLD_STOPPED || in.si_code == CLD_TRAPPED)
|
||||
return 1;
|
||||
if (in.si_code == CLD_CONTINUED)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
client_is_unmanaged(Client *c)
|
||||
{
|
||||
@@ -365,19 +324,36 @@ client_set_scale(struct wlr_surface *s, float scale)
|
||||
wlr_surface_set_preferred_buffer_scale(s, (int32_t)ceilf(scale));
|
||||
}
|
||||
|
||||
static inline void
|
||||
/* Returns nonzero if the client has to commit a buffer with the new size */
|
||||
static inline uint32_t
|
||||
client_set_size(Client *c, uint32_t width, uint32_t height)
|
||||
{
|
||||
#ifdef XWAYLAND
|
||||
if (client_is_x11(c)) {
|
||||
wlr_xwayland_surface_configure(c->surface.xwayland,
|
||||
c->geom.x + c->bw, c->geom.y + c->bw, width, height);
|
||||
return;
|
||||
return (int)width != client_surface(c)->current.width
|
||||
|| (int)height != client_surface(c)->current.height;
|
||||
}
|
||||
#endif
|
||||
if ((int32_t)width != c->surface.xdg->toplevel->current.width
|
||||
|| (int32_t)height != c->surface.xdg->toplevel->current.height)
|
||||
wlr_xdg_toplevel_set_size(c->surface.xdg->toplevel, (int32_t)width, (int32_t)height);
|
||||
if ((int32_t)width == c->surface.xdg->toplevel->scheduled.width
|
||||
&& (int32_t)height == c->surface.xdg->toplevel->scheduled.height)
|
||||
return 0;
|
||||
return wlr_xdg_toplevel_set_size(c->surface.xdg->toplevel, (int32_t)width, (int32_t)height);
|
||||
}
|
||||
|
||||
static inline void
|
||||
client_send_frame_done_iterator(struct wlr_surface *s, int sx, int sy, void *data)
|
||||
{
|
||||
wlr_surface_send_frame_done(s, data);
|
||||
}
|
||||
|
||||
static inline void
|
||||
client_send_frame_done(Client *c)
|
||||
{
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
wlr_surface_for_each_surface(client_surface(c), client_send_frame_done_iterator, &now);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
||||
+4
-1
@@ -172,6 +172,9 @@ static const Button buttons[] = {
|
||||
};
|
||||
|
||||
static const Axis axes[] = {
|
||||
/* example of volume control:
|
||||
{ MODKEY, AxisUp, spawn, SHCMD("volume-up_EXAMPLE") },
|
||||
{ MODKEY, AxisDown, spawn, SHCMD("volume-down_EXAMPLE") },
|
||||
{ MODKEY, AxisDown, spawn, SHCMD("volume-down_EXAMPLE") }, */
|
||||
{ 0, 0, NULL, {0} },
|
||||
/* does nothing, but the array cannot be empty */
|
||||
};
|
||||
|
||||
@@ -8,21 +8,21 @@ PREFIX = /usr/local
|
||||
MANDIR = $(PREFIX)/share/man
|
||||
DATADIR = $(PREFIX)/share
|
||||
|
||||
WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.20`
|
||||
WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.20`
|
||||
WLR_INCS = `$(PKG_CONFIG) --cflags wlroots-0.21`
|
||||
WLR_LIBS = `$(PKG_CONFIG) --libs wlroots-0.21`
|
||||
|
||||
# Allow using an alternative wlroots installation
|
||||
# This has to have all the includes required by wlroots, e.g:
|
||||
# Assuming wlroots git repo is "${PWD}/wlroots" and you only ran "meson setup build && ninja -C build"
|
||||
#WLR_INCS = -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm \
|
||||
# -I$(PWD)/wlroots/include
|
||||
# WLR_INCS = -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm \
|
||||
# -I$(PWD)/wlroots/include
|
||||
# Set -rpath to avoid using the wrong library.
|
||||
#WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/build -L$(PWD)/wlroots/build -lwlroots-0.20
|
||||
# WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/build -L$(PWD)/wlroots/build -lwlroots-0.21
|
||||
|
||||
# Assuming you ran "meson setup --prefix ${PWD}/0.20 build && ninja -C build install"
|
||||
# Assuming you ran "meson setup --prefix ${PWD}/0.21 build && ninja -C build install"
|
||||
#WLR_INCS = -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm \
|
||||
# -I$(PWD)/wlroots/0.20/include/wlroots-0.20
|
||||
#WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/0.20/lib64 -L$(PWD)/wlroots/0.20/lib64 -lwlroots-0.20
|
||||
# -I$(PWD)/wlroots/0.21/include/wlroots-0.21
|
||||
#WLR_LIBS = -Wl,-rpath,$(PWD)/wlroots/0.21/lib64 -L$(PWD)/wlroots/0.21/lib64 -lwlroots-0.21
|
||||
|
||||
XWAYLAND =
|
||||
XLIBS =
|
||||
|
||||
Reference in New Issue
Block a user