mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 01:49:50 +01:00
xwayland: assign wlr_surface on associate
This commit is contained in:
parent
c7fbea3368
commit
432924b372
1 changed files with 4 additions and 2 deletions
|
@ -1190,11 +1190,15 @@ void Events::listener_associateX11(void* owner, void* data) {
|
|||
|
||||
PWINDOW->hyprListener_mapWindow.initCallback(&PWINDOW->m_uSurface.xwayland->surface->events.map, &Events::listener_mapWindow, PWINDOW, "XWayland Window");
|
||||
PWINDOW->hyprListener_commitWindow.initCallback(&PWINDOW->m_uSurface.xwayland->surface->events.commit, &Events::listener_commitWindow, PWINDOW, "XWayland Window");
|
||||
|
||||
PWINDOW->m_pWLSurface.assign(g_pXWaylandManager->getWindowSurface(PWINDOW), PWINDOW);
|
||||
}
|
||||
|
||||
void Events::listener_dissociateX11(void* owner, void* data) {
|
||||
const auto PWINDOW = (CWindow*)owner;
|
||||
|
||||
PWINDOW->m_pWLSurface.unassign();
|
||||
|
||||
PWINDOW->hyprListener_mapWindow.removeCallback();
|
||||
PWINDOW->hyprListener_commitWindow.removeCallback();
|
||||
}
|
||||
|
@ -1219,8 +1223,6 @@ void Events::listener_surfaceXWayland(wl_listener* listener, void* data) {
|
|||
PNEWWINDOW->hyprListener_destroyWindow.initCallback(&XWSURFACE->events.destroy, &Events::listener_destroyWindow, PNEWWINDOW, "XWayland Window");
|
||||
PNEWWINDOW->hyprListener_setOverrideRedirect.initCallback(&XWSURFACE->events.set_override_redirect, &Events::listener_setOverrideRedirect, PNEWWINDOW, "XWayland Window");
|
||||
PNEWWINDOW->hyprListener_configureX11.initCallback(&XWSURFACE->events.request_configure, &Events::listener_configureX11, PNEWWINDOW, "XWayland Window");
|
||||
|
||||
PNEWWINDOW->m_pWLSurface.assign(g_pXWaylandManager->getWindowSurface(PNEWWINDOW), PNEWWINDOW);
|
||||
}
|
||||
|
||||
void Events::listener_newXDGToplevel(wl_listener* listener, void* data) {
|
||||
|
|
Loading…
Reference in a new issue