summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2023-12-15 02:06:53 -0500
committerLuke from DC <[email protected]>2024-01-17 00:33:59 +0000
commit3d06d8b6dd1a26c26f34816a347524aeff3430b2 (patch)
tree109aa2a1f19c02490c3ef0115256cd8ec18cc149 /eel
parent8bb93666b35ee6277071d1b5ab4d52ae57d06975 (diff)
downloadcaja-3d06d8b6dd1a26c26f34816a347524aeff3430b2.tar.bz2
caja-3d06d8b6dd1a26c26f34816a347524aeff3430b2.tar.xz
Manage desktop backgrounds when running in wayland
*Draw the background on the desktop window, using the same code as on navigation windows to bypass the no-root-window issue. *Works from caja's "Change Desktop Background" menu item, from caja-extensions "set as wallpaper" and with changing the background in dconf-editor. *All background options available in x11 supported in wayland, UI is new for wayland *Apply changes immediately, keep the dialog open until closed by user *Let users see changes in realtime while keeping the dialog open *Preview both colors and pictures *Add ability to apply changes from either combobox including using any image saved from when dialog was opened *Add tooltips to the buttons, filepicker, and comboboxes
Diffstat (limited to 'eel')
-rw-r--r--eel/eel-background.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/eel/eel-background.c b/eel/eel-background.c
index 2b50d450..f79797c8 100644
--- a/eel/eel-background.c
+++ b/eel/eel-background.c
@@ -424,16 +424,17 @@ set_root_surface (EelBackground *self,
GdkScreen *screen)
{
eel_background_ensure_realized (self);
+ GdkDisplay *display = gdk_screen_get_display (screen);
if (self->details->use_common_surface) {
self->details->unset_root_surface = FALSE;
} else {
int width, height;
drawable_get_adjusted_size (self, &width, &height);
- self->details->bg_surface = mate_bg_create_surface (self->details->bg, window,
- width, height, TRUE);
+ if ((GDK_IS_X11_DISPLAY (display)) || (self->details->bg_surface == NULL))
+ self->details->bg_surface = mate_bg_create_surface (self->details->bg, window,
+ width, height, TRUE);
}
- GdkDisplay *display = gdk_screen_get_display (screen);
if ((GDK_IS_X11_DISPLAY (display)) && (self->details->bg_surface != NULL))
mate_bg_set_surface_as_root (screen, self->details->bg_surface);
}
@@ -671,11 +672,10 @@ widget_realized_setup (GtkWidget *widget,
self->details->use_common_surface =
(gdk_window_get_visual (window) == gtk_widget_get_visual (widget)) ? TRUE : FALSE;
}
- else /*Wayland is always composited*/
+ else /*Wayland is always composited but never has a root window*/
{
- self->details->use_common_surface = TRUE;
+ self->details->use_common_surface = FALSE;
}
-
init_fade (self);
}