Merge remote-tracking branch 'upstream/main' into wlroots-next
This commit is contained in:
commit
5d73134e33
2
client.h
2
client.h
|
@ -350,7 +350,7 @@ client_set_size(Client *c, uint32_t width, uint32_t height)
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
if (client_is_x11(c)) {
|
if (client_is_x11(c)) {
|
||||||
wlr_xwayland_surface_configure(c->surface.xwayland,
|
wlr_xwayland_surface_configure(c->surface.xwayland,
|
||||||
c->geom.x, c->geom.y, width, height);
|
c->geom.x + c->bw, c->geom.y + c->bw, width, height);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -36,8 +36,10 @@ static const Layout layouts[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* monitors */
|
/* monitors */
|
||||||
/* (x=-1, y=-1) is reserved as an "autoconfigure" monitor position indicator */
|
/* (x=-1, y=-1) is reserved as an "autoconfigure" monitor position indicator
|
||||||
/* WARNING: negative values other than (-1, -1) cause problems with xwayland clients' menus */
|
* WARNING: negative values other than (-1, -1) cause problems with Xwayland clients
|
||||||
|
* https://gitlab.freedesktop.org/xorg/xserver/-/issues/899
|
||||||
|
*/
|
||||||
/* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
|
/* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
|
||||||
static const MonitorRule monrules[] = {
|
static const MonitorRule monrules[] = {
|
||||||
/* name mfact nmaster scale layout rotate/reflect x y */
|
/* name mfact nmaster scale layout rotate/reflect x y */
|
||||||
|
|
8
dwl.c
8
dwl.c
|
@ -72,6 +72,7 @@
|
||||||
#define MAX(A, B) ((A) > (B) ? (A) : (B))
|
#define MAX(A, B) ((A) > (B) ? (A) : (B))
|
||||||
#define MIN(A, B) ((A) < (B) ? (A) : (B))
|
#define MIN(A, B) ((A) < (B) ? (A) : (B))
|
||||||
#define ROUND(X) ((int)((X < 0) ? (X - 0.5) : (X + 0.5)))
|
#define ROUND(X) ((int)((X < 0) ? (X - 0.5) : (X + 0.5)))
|
||||||
|
#define CEIL(X) ((int)((X < 0) ? (X) : ((int)X == X) ? (X) : ((int)X + 1)))
|
||||||
#define CLEANMASK(mask) (mask & ~WLR_MODIFIER_CAPS)
|
#define CLEANMASK(mask) (mask & ~WLR_MODIFIER_CAPS)
|
||||||
#define VISIBLEON(C, M) ((M) && (C)->mon == (M) && ((C)->tags & (M)->tagset[(M)->seltags]))
|
#define VISIBLEON(C, M) ((M) && (C)->mon == (M) && ((C)->tags & (M)->tagset[(M)->seltags]))
|
||||||
#define LENGTH(X) (sizeof X / sizeof X[0])
|
#define LENGTH(X) (sizeof X / sizeof X[0])
|
||||||
|
@ -936,6 +937,8 @@ createlayersurface(struct wl_listener *listener, void *data)
|
||||||
|
|
||||||
wl_list_insert(&l->mon->layers[layer_surface->pending.layer],&l->link);
|
wl_list_insert(&l->mon->layers[layer_surface->pending.layer],&l->link);
|
||||||
wlr_surface_send_enter(surface, layer_surface->output);
|
wlr_surface_send_enter(surface, layer_surface->output);
|
||||||
|
wlr_fractional_scale_v1_notify_scale(surface, l->mon->wlr_output->scale);
|
||||||
|
wlr_surface_set_preferred_buffer_scale(surface, CEIL(l->mon->wlr_output->scale));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1700,8 +1703,7 @@ mapnotify(struct wl_listener *listener, void *data)
|
||||||
if (client_is_unmanaged(c)) {
|
if (client_is_unmanaged(c)) {
|
||||||
/* Unmanaged clients always are floating */
|
/* Unmanaged clients always are floating */
|
||||||
wlr_scene_node_reparent(&c->scene->node, layers[LyrFloat]);
|
wlr_scene_node_reparent(&c->scene->node, layers[LyrFloat]);
|
||||||
wlr_scene_node_set_position(&c->scene->node, c->geom.x + borderpx,
|
wlr_scene_node_set_position(&c->scene->node, c->geom.x, c->geom.y);
|
||||||
c->geom.y + borderpx);
|
|
||||||
if (client_wants_focus(c)) {
|
if (client_wants_focus(c)) {
|
||||||
focusclient(c, 1);
|
focusclient(c, 1);
|
||||||
exclusive_focus = c;
|
exclusive_focus = c;
|
||||||
|
@ -3092,7 +3094,7 @@ createnotifyx11(struct wl_listener *listener, void *data)
|
||||||
c = xsurface->data = ecalloc(1, sizeof(*c));
|
c = xsurface->data = ecalloc(1, sizeof(*c));
|
||||||
c->surface.xwayland = xsurface;
|
c->surface.xwayland = xsurface;
|
||||||
c->type = X11;
|
c->type = X11;
|
||||||
c->bw = borderpx;
|
c->bw = client_is_unmanaged(c) ? 0 : borderpx;
|
||||||
|
|
||||||
/* Listen to the various events it can emit */
|
/* Listen to the various events it can emit */
|
||||||
LISTEN(&xsurface->events.associate, &c->associate, associatex11);
|
LISTEN(&xsurface->events.associate, &c->associate, associatex11);
|
||||||
|
|
Loading…
Reference in a new issue