xnest: Use SetNotifyFd to receive events
Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
		
							parent
							
								
									24e65bf0db
								
							
						
					
					
						commit
						55c2e1a3aa
					
				| 
						 | 
					@ -35,6 +35,7 @@ is" without express or implied warranty.
 | 
				
			||||||
#include "Pointer.h"
 | 
					#include "Pointer.h"
 | 
				
			||||||
#include "Keyboard.h"
 | 
					#include "Keyboard.h"
 | 
				
			||||||
#include "Handlers.h"
 | 
					#include "Handlers.h"
 | 
				
			||||||
 | 
					#include "Events.h"
 | 
				
			||||||
#include "Init.h"
 | 
					#include "Init.h"
 | 
				
			||||||
#include "Args.h"
 | 
					#include "Args.h"
 | 
				
			||||||
#include "Drawable.h"
 | 
					#include "Drawable.h"
 | 
				
			||||||
| 
						 | 
					@ -86,6 +87,12 @@ InitOutput(ScreenInfo * screen_info, int argc, char *argv[])
 | 
				
			||||||
    xnestDoFullGeneration = xnestFullGeneration;
 | 
					    xnestDoFullGeneration = xnestFullGeneration;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void
 | 
				
			||||||
 | 
					xnestNotifyConnection(int fd, int ready, void *data)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    xnestCollectEvents();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
InitInput(int argc, char *argv[])
 | 
					InitInput(int argc, char *argv[])
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					@ -101,7 +108,7 @@ InitInput(int argc, char *argv[])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    mieqInit();
 | 
					    mieqInit();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    AddEnabledDevice(XConnectionNumber(xnestDisplay));
 | 
					    SetNotifyFd(XConnectionNumber(xnestDisplay), xnestNotifyConnection, X_NOTIFY_READ, NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    RegisterBlockAndWakeupHandlers(xnestBlockHandler, xnestWakeupHandler, NULL);
 | 
					    RegisterBlockAndWakeupHandlers(xnestBlockHandler, xnestWakeupHandler, NULL);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue