Clear window to prevent accumulations
This commit is contained in:
		
							parent
							
								
									c09f0f029f
								
							
						
					
					
						commit
						7a094bc702
					
				| @ -160,6 +160,9 @@ void x_display_surface(cairo_surface_t *srf, struct window_x11 *win, const struc | ||||
|         x_win_move(win, dim->x, dim->y, dim->w, dim->h); | ||||
|         cairo_xlib_surface_set_size(win->root_surface, dim->w, dim->h); | ||||
| 
 | ||||
|         XClearWindow(xctx.dpy, win->xwin); | ||||
|         XFlush(xctx.dpy); | ||||
| 
 | ||||
|         cairo_set_source_surface(win->c_ctx, srf, 0, 0); | ||||
|         cairo_paint(win->c_ctx); | ||||
|         cairo_show_page(win->c_ctx); | ||||
| @ -650,6 +653,7 @@ struct window_x11 *x_win_create(void) | ||||
| 
 | ||||
|         wa.override_redirect = true; | ||||
|         wa.background_pixmap = ParentRelative; | ||||
|         wa.background_pixel = 0; | ||||
|         wa.event_mask = | ||||
|             ExposureMask | KeyPressMask | VisibilityChangeMask | | ||||
|             ButtonReleaseMask | FocusChangeMask| StructureNotifyMask; | ||||
| @ -665,7 +669,7 @@ struct window_x11 *x_win_create(void) | ||||
|                                  DefaultDepth(xctx.dpy, DefaultScreen(xctx.dpy)), | ||||
|                                  CopyFromParent, | ||||
|                                  DefaultVisual(xctx.dpy, DefaultScreen(xctx.dpy)), | ||||
|                                  CWOverrideRedirect | CWBackPixmap | CWEventMask, | ||||
|                                  CWOverrideRedirect | CWBackPixmap | CWBackPixel | CWEventMask, | ||||
|                                  &wa); | ||||
| 
 | ||||
|         x_set_wm(win->xwin); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Nikita Zlobin
						Nikita Zlobin