Fixed WMProtocols registration order (before mapping window)
This commit is contained in:
		
							parent
							
								
									5b6467913c
								
							
						
					
					
						commit
						d5f0a20de0
					
				
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @ -1,4 +1,4 @@ | |||||||
| VERSION = git-20120514 | VERSION = git-20120807 | ||||||
| 
 | 
 | ||||||
| PREFIX    = /usr/local | PREFIX    = /usr/local | ||||||
| MANPREFIX = $(PREFIX)/share/man | MANPREFIX = $(PREFIX)/share/man | ||||||
|  | |||||||
							
								
								
									
										7
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								window.c
									
									
									
									
									
								
							| @ -128,6 +128,8 @@ void win_init(win_t *win) { | |||||||
| 		warn("no locale support"); | 		warn("no locale support"); | ||||||
| 
 | 
 | ||||||
| 	win_init_font(e->dpy, BAR_FONT); | 	win_init_font(e->dpy, BAR_FONT); | ||||||
|  | 
 | ||||||
|  | 	wm_delete_win = XInternAtom(e->dpy, "WM_DELETE_WINDOW", False); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void win_set_sizehints(win_t *win) { | void win_set_sizehints(win_t *win) { | ||||||
| @ -209,6 +211,8 @@ void win_open(win_t *win) { | |||||||
| 	classhint.res_class = "Sxiv"; | 	classhint.res_class = "Sxiv"; | ||||||
| 	XSetClassHint(e->dpy, win->xwin, &classhint); | 	XSetClassHint(e->dpy, win->xwin, &classhint); | ||||||
| 
 | 
 | ||||||
|  | 	XSetWMProtocols(e->dpy, win->xwin, &wm_delete_win, 1); | ||||||
|  | 
 | ||||||
| 	if (!options->hide_bar) { | 	if (!options->hide_bar) { | ||||||
| 		win->barh = font.ascent + font.descent + 2 * V_TEXT_PAD; | 		win->barh = font.ascent + font.descent + 2 * V_TEXT_PAD; | ||||||
| 		win->h -= win->barh; | 		win->h -= win->barh; | ||||||
| @ -220,9 +224,6 @@ void win_open(win_t *win) { | |||||||
| 	XMapWindow(e->dpy, win->xwin); | 	XMapWindow(e->dpy, win->xwin); | ||||||
| 	XFlush(e->dpy); | 	XFlush(e->dpy); | ||||||
| 
 | 
 | ||||||
| 	wm_delete_win = XInternAtom(e->dpy, "WM_DELETE_WINDOW", False); |  | ||||||
| 	XSetWMProtocols(e->dpy, win->xwin, &wm_delete_win, 1); |  | ||||||
| 	 |  | ||||||
| 	if (options->fullscreen) | 	if (options->fullscreen) | ||||||
| 		win_toggle_fullscreen(win); | 		win_toggle_fullscreen(win); | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Bert Münnich
						Bert Münnich