Skip to content

Commit

Permalink
always pop GDK errors
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jul 26, 2022
1 parent 10c5980 commit 4425c08
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions xpra/x11/gtk3/gdk_bindings.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -807,12 +807,14 @@ cdef object _gw(display, Window xwin):
disp = get_raw_display_for(display)
gdk_x11_display_error_trap_push(disp)
try:
try:
win = GdkX11.X11Window.foreign_new_for_display(display, xwin)
except TypeError as e:
except TypeError as e:
verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e)
return None
gdk_display_flush(disp)
error = gdk_x11_display_error_trap_pop(disp)
gdk_display_flush(disp)
finally:
error = gdk_x11_display_error_trap_pop(disp)
except Exception as e:
verbose("cannot get gdk window for %s, %#x: %s", display, xwin, e)
if disp:
Expand Down

0 comments on commit 4425c08

Please sign in to comment.