diff options
author | lukefromdc <[email protected]> | 2023-12-15 02:06:53 -0500 |
---|---|---|
committer | Luke from DC <[email protected]> | 2024-01-17 00:33:59 +0000 |
commit | 3d06d8b6dd1a26c26f34816a347524aeff3430b2 (patch) | |
tree | 109aa2a1f19c02490c3ef0115256cd8ec18cc149 /src/caja-desktop-window.c | |
parent | 8bb93666b35ee6277071d1b5ab4d52ae57d06975 (diff) | |
download | caja-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 'src/caja-desktop-window.c')
-rw-r--r-- | src/caja-desktop-window.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/caja-desktop-window.c b/src/caja-desktop-window.c index 6188fa63..662c2472 100644 --- a/src/caja-desktop-window.c +++ b/src/caja-desktop-window.c @@ -390,10 +390,12 @@ realize (GtkWidget *widget) G_CALLBACK (caja_desktop_window_screen_size_changed), window); } +/* Should only reached in x11*/ static gboolean draw (GtkWidget *widget, cairo_t *cr) { + g_assert (GDK_IS_X11_DISPLAY (gdk_display_get_default())); eel_background_draw (widget, cr); return GTK_WIDGET_CLASS (caja_desktop_window_parent_class)->draw (widget, cr); } @@ -415,6 +417,9 @@ caja_desktop_window_class_init (CajaDesktopWindowClass *klass) wclass->realize = realize; wclass->unrealize = unrealize; wclass->map = map; + /*Drawing the desktop background from here gives a black background in wayland + *So manage desktop background from the icon container as in navigation windows + */ if (GDK_IS_X11_DISPLAY (gdk_display_get_default())) wclass->draw = draw; |