wayland: dockapp rendering (WIP - XWayland surface shown as-is)
Shows the XWayland toplevel surface in the dock tile. Black background is an inherent limitation of X11 opaque windows under XWayland. Next step: native Wayland dockapp protocol for proper transparency.
This commit is contained in:
parent
2cfbd7d34b
commit
e109979dcb
13
src/icon.c
13
src/icon.c
|
|
@ -814,15 +814,10 @@ static void set_dockapp_in_icon(WIcon *icon)
|
||||||
/* Put the dock application in the icon.
|
/* Put the dock application in the icon.
|
||||||
* On Wayland, the icon_win child window has no separate surface —
|
* On Wayland, the icon_win child window has no separate surface —
|
||||||
* XWayland composites it into the parent toplevel. Reparent the
|
* XWayland composites it into the parent toplevel. Reparent the
|
||||||
* owner's main client_win instead so its surface appears in the tile. */
|
* owner's client surface into the dock tile frame_buf tree. */
|
||||||
{
|
if (icon->owner && icon->owner->client_win) {
|
||||||
WNativeWindow reparent_win = (WNativeWindow)icon->icon_win;
|
wm_backend->window_resize(icon->owner->client_win, w, h);
|
||||||
if (icon->owner && icon->owner->client_win) {
|
wm_backend->client_reparent(icon->owner->client_win, icon->core->window,
|
||||||
reparent_win = icon->owner->client_win;
|
|
||||||
/* Resize the toplevel surface to fit the dock tile */
|
|
||||||
wm_backend->window_resize(reparent_win, w, h);
|
|
||||||
}
|
|
||||||
wm_backend->client_reparent(reparent_win, icon->core->window,
|
|
||||||
(wPreferences.icon_size - w) / 2,
|
(wPreferences.icon_size - w) / 2,
|
||||||
(wPreferences.icon_size - h) / 2);
|
(wPreferences.icon_size - h) / 2);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue