Defer the callbacks to an idle to avoid deadlock with xcb-ified libX11.
2007-03-08 Matthias Clasen <mclasen@redhat.com> * gdk/x11/gdkasync.c (send_event_handler): Defer the callbacks to an idle to avoid deadlock with xcb-ified libX11. (#413032, Sebastian Dröge) svn path=/trunk/; revision=17436
This commit is contained in:
		 Matthias Clasen
					Matthias Clasen
				
			
				
					committed by
					
						 Matthias Clasen
						Matthias Clasen
					
				
			
			
				
	
			
			
			 Matthias Clasen
						Matthias Clasen
					
				
			
						parent
						
							9aca5027dd
						
					
				
				
					commit
					3eb22a1ff8
				
			| @ -1,3 +1,9 @@ | ||||
| 2007-03-08  Matthias Clasen <mclasen@redhat.com> | ||||
|  | ||||
| 	* gdk/x11/gdkasync.c (send_event_handler): Defer the callbacks | ||||
| 	to an idle to avoid deadlock with xcb-ified libX11.  (#413032, | ||||
| 	Sebastian Dröge) | ||||
|  | ||||
| 2007-03-08  Matthias Clasen <mclasen@redhat.com> | ||||
|  | ||||
| 	* gtk/gtknotebook.c (gtk_notebook_real_insert_page): | ||||
|  | ||||
| @ -112,6 +112,18 @@ struct _SetInputFocusState | ||||
|   gulong get_input_focus_req; | ||||
| }; | ||||
|  | ||||
| static gboolean | ||||
| callback_idle (gpointer data) | ||||
| { | ||||
|   SendEventState *state = (SendEventState *)data;   | ||||
|    | ||||
|   state->callback (state->window, !state->have_error, state->data); | ||||
|  | ||||
|   g_free (state); | ||||
|  | ||||
|   return FALSE; | ||||
| } | ||||
|  | ||||
| static Bool | ||||
| send_event_handler (Display *dpy, | ||||
| 		    xReply  *rep, | ||||
| @ -147,12 +159,10 @@ send_event_handler (Display *dpy, | ||||
| 	} | ||||
|  | ||||
|       if (state->callback) | ||||
| 	state->callback (state->window, !state->have_error, state->data); | ||||
|         gdk_threads_add_idle (callback_idle, state); | ||||
|  | ||||
|       DeqAsyncHandler(state->dpy, &state->async); | ||||
|  | ||||
|       g_free (state); | ||||
|  | ||||
|       return (rep->generic.type != X_Error); | ||||
|     } | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user