Package list xapp / dc3fe04
xapp-gtk-window: Trap X errors when setting progress This should be a best effort feature for applications and it shouldn't ever result in making applications segfault. Note: This could be tested easily by setting progress on an erroneous XID. This resulted in a BadWindow crash. With this commit, the error is now trapped and no impact is suffered on the calling application. Clement Lefebvre 4 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
109109 GdkDisplay *display;
110110
111111 display = gdk_display_get_default ();
112
113 gdk_error_trap_push ();
112114
113115 if (cardinal > 0)
114116 {
125127 xid,
126128 gdk_x11_get_xatom_by_name_for_display (display, atom_name));
127129 }
130
131 gdk_error_trap_pop ();
128132 }
129133
130134 static Window