aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-02-22 17:33:16 +0000
committerVaxry <[email protected]>2024-02-22 17:33:23 +0000
commitd9757b61bfb7dcfaf3d903092435a1aaff52b7ed (patch)
tree30afc841893c7a70eb4b89cc81648f0b05416d69
parent28410922da556b5960e1c47cf63cc3f3f4aa3384 (diff)
downloadHyprland-d9757b61bfb7dcfaf3d903092435a1aaff52b7ed.tar.gz
Hyprland-d9757b61bfb7dcfaf3d903092435a1aaff52b7ed.zip
xdg: manually schedule initial configures
chasing wlroots fixes #4801
-rw-r--r--src/events/Popups.cpp5
-rw-r--r--src/events/Windows.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/src/events/Popups.cpp b/src/events/Popups.cpp
index ae95bc5e..41707b6a 100644
--- a/src/events/Popups.cpp
+++ b/src/events/Popups.cpp
@@ -228,6 +228,11 @@ void Events::listener_unmapPopupXDG(void* owner, void* data) {
void Events::listener_commitPopupXDG(void* owner, void* data) {
SXDGPopup* PPOPUP = (SXDGPopup*)owner;
+ if (PPOPUP->popup->base->initial_commit) {
+ wlr_xdg_surface_schedule_configure(PPOPUP->popup->base);
+ return;
+ }
+
if (g_pCompositor->windowValidMapped(PPOPUP->parentWindow)) {
PPOPUP->lx = PPOPUP->parentWindow->m_vRealPosition.vec().x;
PPOPUP->ly = PPOPUP->parentWindow->m_vRealPosition.vec().y;
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp
index ea45ad48..0854f68e 100644
--- a/src/events/Windows.cpp
+++ b/src/events/Windows.cpp
@@ -804,6 +804,11 @@ void Events::listener_ackConfigure(void* owner, void* data) {
void Events::listener_commitWindow(void* owner, void* data) {
CWindow* PWINDOW = (CWindow*)owner;
+ if (!PWINDOW->m_bIsX11 && PWINDOW->m_uSurface.xdg->initial_commit) {
+ wlr_xdg_toplevel_set_size(PWINDOW->m_uSurface.xdg->toplevel, 0, 0);
+ return;
+ }
+
if (!PWINDOW->m_bIsMapped || PWINDOW->isHidden())
return;