Created
October 21, 2023 20:21
-
-
Save jlindgren90/dc6c37bd7c05635092e1d8f93744713b to your computer and use it in GitHub Desktop.
xdg.c configure debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/xdg.c b/src/xdg.c | |
index 7864da4..9b823fe 100644 | |
--- a/src/xdg.c | |
+++ b/src/xdg.c | |
@@ -91,6 +91,14 @@ handle_commit(struct wl_listener *listener, void *data) | |
struct wlr_box size; | |
wlr_xdg_surface_get_geometry(xdg_surface, &size); | |
+ wlr_log(WLR_ERROR, "view %p (%s) current=%dx%d pending=%dx%d commit=%dx%d", | |
+ view, view_get_string_prop(view, "title"), | |
+ view->current.width, view->current.height, | |
+ view->pending.width, view->pending.height, | |
+ size.width, size.height); | |
+ wlr_log(WLR_ERROR, "pending serial=%d commit=%d", | |
+ view->pending_configure_serial, | |
+ xdg_surface->current.configure_serial); | |
struct wlr_box *current = &view->current; | |
bool update_required = current->width != size.width | |
@@ -120,6 +128,12 @@ handle_configure_timeout(void *data) | |
const char *app_id = view_get_string_prop(view, "app_id"); | |
wlr_log(WLR_INFO, "client (%s) did not respond to configure request " | |
"in %d ms", app_id, CONFIGURE_TIMEOUT_MS); | |
+ wlr_log(WLR_ERROR, "view %p (%s) current=%dx%d pending=%dx%d at timeout", | |
+ view, view_get_string_prop(view, "title"), | |
+ view->current.width, view->current.height, | |
+ view->pending.width, view->pending.height); | |
+ wlr_log(WLR_ERROR, "pending serial=%d", | |
+ view->pending_configure_serial); | |
wl_event_source_remove(view->pending_configure_timeout); | |
view->pending_configure_serial = 0; | |
@@ -134,6 +148,7 @@ handle_configure_timeout(void *data) | |
static void | |
set_pending_configure_serial(struct view *view, uint32_t serial) | |
{ | |
+ wlr_log(WLR_ERROR, "set pending serial=%d", serial); | |
view->pending_configure_serial = serial; | |
if (!view->pending_configure_timeout) { | |
view->pending_configure_timeout = | |
@@ -271,8 +286,15 @@ xdg_toplevel_view_configure(struct view *view, struct wlr_box geo) | |
*/ | |
if (geo.width != view->pending.width | |
|| geo.height != view->pending.height) { | |
+ wlr_log(WLR_ERROR, "view %p (%s) current=%dx%d pending=%dx%d configure=%dx%d", | |
+ view, view_get_string_prop(view, "title"), | |
+ view->current.width, view->current.height, | |
+ view->pending.width, view->pending.height, | |
+ geo.width, geo.height); | |
serial = wlr_xdg_toplevel_set_size(xdg_toplevel_from_view(view), | |
geo.width, geo.height); | |
+ wlr_log(WLR_ERROR, "configure serial=%d", | |
+ serial); | |
} | |
view->pending = geo; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment