Wakeup on PropertyNotify
This causes dunst to wakeup when _NET_ACTIVE_WINDOW changed so we can check wether we need to move to another monitor.
This commit is contained in:
		
							parent
							
								
									44612489ab
								
							
						
					
					
						commit
						779c4354c4
					
				
							
								
								
									
										7
									
								
								x.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								x.c
									
									
									
									
									
								
							@ -508,8 +508,9 @@ gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback,
 | 
				
			|||||||
                        break;
 | 
					                        break;
 | 
				
			||||||
                case FocusIn:
 | 
					                case FocusIn:
 | 
				
			||||||
                case FocusOut:
 | 
					                case FocusOut:
 | 
				
			||||||
                        printf("Focus Event\n");
 | 
					                case PropertyNotify:
 | 
				
			||||||
                        wake_up();
 | 
					                        wake_up();
 | 
				
			||||||
 | 
					                        break;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return true;
 | 
					        return true;
 | 
				
			||||||
@ -755,7 +756,7 @@ void x_win_setup(void)
 | 
				
			|||||||
        wa.background_pixmap = ParentRelative;
 | 
					        wa.background_pixmap = ParentRelative;
 | 
				
			||||||
        wa.event_mask =
 | 
					        wa.event_mask =
 | 
				
			||||||
            ExposureMask | KeyPressMask | VisibilityChangeMask |
 | 
					            ExposureMask | KeyPressMask | VisibilityChangeMask |
 | 
				
			||||||
            ButtonPressMask | FocusChangeMask;
 | 
					            ButtonPressMask | FocusChangeMask| StructureNotifyMask;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        screen_info scr;
 | 
					        screen_info scr;
 | 
				
			||||||
        x_screen_info(&scr);
 | 
					        x_screen_info(&scr);
 | 
				
			||||||
@ -772,7 +773,7 @@ void x_win_setup(void)
 | 
				
			|||||||
                   (unsigned long)((100 - settings.transparency) *
 | 
					                   (unsigned long)((100 - settings.transparency) *
 | 
				
			||||||
                                   (0xffffffff / 100)));
 | 
					                                   (0xffffffff / 100)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        long root_event_mask = FocusChangeMask;
 | 
					        long root_event_mask = FocusChangeMask | PropertyChangeMask;
 | 
				
			||||||
        XSelectInput(xctx.dpy, root, root_event_mask);
 | 
					        XSelectInput(xctx.dpy, root, root_event_mask);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user