Repository navigation
Commit 3557985
Fix the auth dialog freezing under Wayland/XWayland (#120)
Root-caused live via gdb, attached to a genuinely stuck process rather
than guessed from source. The ECCE Authentication dialog would show,
accept pointer clicks (OK/Cancel/Change work), and accept zero
keystrokes -- looking exactly like a focus problem, and it is one, but
not the one already fixed for this issue (a modal parented to the
hidden Gateway frame). p_window was reliably nil (a proper unparented
top-level) on every occurrence, including stuck ones.
Confirmed via live introspection on the stuck process (gdb, calling
into the running GTK/GDK state directly):
- The X server's own focus (`xdotool getwindowfocus`,
`_NET_ACTIVE_WINDOW`) was on Mutter's internal placeholder window
(no WM_CLASS, no window type), not the dialog.
- GTK agreed: gtk_window_is_active()/has_toplevel_focus() were both 0.
But gtk_window_get_focus() returned a real widget -- the dialog's
own internal focus-widget tracking was correct; only the toplevel
window's WM-level activation was missing.
- Forcing gtk_window_present() (the correct high-level GTK call) did
NOT fix it. Forcing gtk_window_present_with_time() with a genuinely
fresh timestamp from gdk_x11_get_server_time() DID -- is_active
flipped to 1 immediately.
That isolates the cause: this dialog is shown as the very first UI
action in the process's life, before wx's MainLoop() has started and
before the app has processed any real, user-generated X event. wx's
default Show()/ShowModal() path requests activation with whatever
timestamp GDK has cached at that point (0/stale, this early), and
Mutter's focus-stealing prevention silently declines an activation
request carrying an invalid/stale timestamp -- the window ends up
mapped and input-accepting with nothing actually listening.
Fix: WxDavAuth::prompt() explicitly calls
gtk_window_present_with_time() with a fresh, server-fetched timestamp
before every ShowModal() in its retry loop (a re-prompt after a failed
password is its own fresh Show(), same failure shape). CMakeLists.txt
gains the gtk+-3.0 include/link eccewxgui needs for the direct GTK/GDK
calls, following eccewxplotctrl's existing pkg_check_modules(GTK3)
pattern.
Verified live: the exact close-the-dialog-via-X-then-relaunch sequence
that reliably reproduced the freeze no longer does, across several
repeated attempts.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E4HPD1xaxKpyh9gZ6hsBP21 parent 819d799 commit 3557985
2 files changed
Lines changed: 76 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
270 | 282 | | |
271 | 283 | | |
272 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
18 | 29 | | |
19 | 30 | | |
20 | 31 | | |
| |||
244 | 255 | | |
245 | 256 | | |
246 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
247 | 279 | | |
248 | 280 | | |
249 | 281 | | |
| |||
261 | 293 | | |
262 | 294 | | |
263 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
264 | 328 | | |
265 | 329 | | |
266 | 330 | | |
| |||
0 commit comments