fix a compositing bug when the wallpaper is empty

This commit is contained in:
Vincent Wei
2023-08-01 16:33:27 +08:00
parent 1131973f7a
commit bc7d5f6ce0
2 changed files with 4 additions and 2 deletions
+1
View File
@@ -228,6 +228,7 @@ static void composite_wallpaper_rect (CompositorCtxt* ctxt,
}
}
else {
SelectClipRect (HDC_SCREEN_SYS, dirty_rc);
SetBrushColor (HDC_SCREEN_SYS,
GetWindowElementPixelEx (HWND_DESKTOP, HDC_SCREEN_SYS,
WE_BGC_DESKTOP));
+3 -2
View File
@@ -240,8 +240,10 @@ static GAL_Surface* create_wp_surface(GAL_Surface* screen)
req.len_data = strlen (SYSSF_WALLPAPER_PATTER) + 1;
if ((ClientRequestEx2 (&req, NULL, 0, -1,
&info, sizeof (SHAREDSURFINFO), &fd) < 0) || (fd < 0))
&info, sizeof (SHAREDSURFINFO), &fd) < 0) || (fd < 0)) {
_WRN_PRINTF ("creating an empty wallpaper pattern surface\n");
goto empty;
}
_DBG_PRINTF ("REQID_GETSHAREDSURFACE: size (%lu), flags (0x%x), fd: %d\n",
info.size, info.flags, fd);
@@ -253,7 +255,6 @@ static GAL_Surface* create_wp_surface(GAL_Surface* screen)
}
empty:
_DBG_PRINTF ("creating an empty wallpaper pattern surface\n");
if (IsServer()) {
return GAL_CreateRGBSurface (GAL_SWSURFACE, 0, 0,
screen->format->BitsPerPixel,