Ensure the inactivity alarm is launched on startup
We forgot to flush.
This commit is contained in:
		
							
								
								
									
										5
									
								
								wdmtg.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								wdmtg.c
									
									
									
									
									
								
							@@ -523,8 +523,6 @@ generator_init(void)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	const uint32_t values[] = { XCB_EVENT_MASK_PROPERTY_CHANGE };
 | 
						const uint32_t values[] = { XCB_EVENT_MASK_PROPERTY_CHANGE };
 | 
				
			||||||
	(void) xcb_change_window_attributes(gen.X, root, XCB_CW_EVENT_MASK, values);
 | 
						(void) xcb_change_window_attributes(gen.X, root, XCB_CW_EVENT_MASK, values);
 | 
				
			||||||
	(void) xcb_flush(gen.X);
 | 
					 | 
				
			||||||
	// TODO: how are XCB errors handled?  What if the last xcb_flush() fails?
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	GKeyFile *kf = g_key_file_new();
 | 
						GKeyFile *kf = g_key_file_new();
 | 
				
			||||||
	gchar *subpath = g_build_filename(PROJECT_NAME, PROJECT_NAME ".conf", NULL);
 | 
						gchar *subpath = g_build_filename(PROJECT_NAME, PROJECT_NAME ".conf", NULL);
 | 
				
			||||||
@@ -549,6 +547,9 @@ generator_init(void)
 | 
				
			|||||||
	update_current_window();
 | 
						update_current_window();
 | 
				
			||||||
	set_idle_alarm(&gen.idle_alarm_inactive,
 | 
						set_idle_alarm(&gen.idle_alarm_inactive,
 | 
				
			||||||
		XCB_SYNC_TESTTYPE_POSITIVE_COMPARISON, gen.idle_timeout);
 | 
							XCB_SYNC_TESTTYPE_POSITIVE_COMPARISON, gen.idle_timeout);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						(void) xcb_flush(gen.X);
 | 
				
			||||||
 | 
						// TODO: how are XCB errors handled?  What if the last xcb_flush() fails?
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user