summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/preview-widget.c4
-rw-r--r--src/ui/tile-preview.c34
2 files changed, 19 insertions, 19 deletions
diff --git a/src/ui/preview-widget.c b/src/ui/preview-widget.c
index 58122706..da8593d4 100644
--- a/src/ui/preview-widget.c
+++ b/src/ui/preview-widget.c
@@ -620,7 +620,7 @@ meta_preview_get_icon (void)
NULL);
else
default_icon = gtk_icon_theme_load_icon (theme,
- "gtk-missing-image",
+ "image-missing",
META_ICON_WIDTH,
0,
NULL);
@@ -653,7 +653,7 @@ meta_preview_get_mini_icon (void)
NULL);
else
default_icon = gtk_icon_theme_load_icon (theme,
- "gtk-missing-image",
+ "image-missing",
META_MINI_ICON_WIDTH,
0,
NULL);
diff --git a/src/ui/tile-preview.c b/src/ui/tile-preview.c
index 71b2e297..ee58600d 100644
--- a/src/ui/tile-preview.c
+++ b/src/ui/tile-preview.c
@@ -28,6 +28,8 @@
#include "tile-preview.h"
#include "core.h"
+#include "types.h"
+#include "core/screen-private.h"
#define OUTLINE_WIDTH 5 /* frame width in non-composite case */
@@ -177,8 +179,7 @@ on_preview_window_style_set (GtkWidget *widget,
}
MetaTilePreview *
-meta_tile_preview_new (int screen_number,
- gboolean composited)
+meta_tile_preview_new (int screen_number)
{
MetaTilePreview *preview;
#if !GTK_CHECK_VERSION (3, 0, 0)
@@ -207,23 +208,14 @@ meta_tile_preview_new (int screen_number,
preview->tile_rect.width = preview->tile_rect.height = 0;
#if GTK_CHECK_VERSION (3, 0, 0)
- preview->has_alpha = composited && (gdk_screen_get_rgba_visual (screen) != NULL);
+ gtk_widget_set_visual (preview->preview_window,
+ gdk_screen_get_rgba_visual (screen));
#else
- preview->has_alpha = rgba_colormap && composited;
+ gtk_widget_set_colormap (preview->preview_window, rgba_colormap);
#endif
- if (preview->has_alpha)
- {
-#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_widget_set_visual (preview->preview_window,
- gdk_screen_get_rgba_visual (screen));
-#else
- gtk_widget_set_colormap (preview->preview_window, rgba_colormap);
-#endif
-
- g_signal_connect (preview->preview_window, "style-set",
- G_CALLBACK (on_preview_window_style_set), preview);
- }
+ g_signal_connect (preview->preview_window, "style-set",
+ G_CALLBACK (on_preview_window_style_set), preview);
gtk_widget_realize (preview->preview_window);
#if !GTK_CHECK_VERSION (3, 0, 0)
@@ -259,7 +251,8 @@ meta_tile_preview_free (MetaTilePreview *preview)
void
meta_tile_preview_show (MetaTilePreview *preview,
- MetaRectangle *tile_rect)
+ MetaRectangle *tile_rect,
+ MetaScreen *screen)
{
GdkWindow *window;
GdkRectangle old_rect;
@@ -292,6 +285,11 @@ meta_tile_preview_show (MetaTilePreview *preview,
gdk_window_move_resize (window,
preview->tile_rect.x, preview->tile_rect.y,
preview->tile_rect.width, preview->tile_rect.height);
+#if HAVE_COMPOSITE_EXTENSIONS
+ preview->has_alpha = meta_screen_is_cm_selected (screen);
+#else
+ preview->has_alpha = FALSE;
+#endif
if (!preview->has_alpha)
{
@@ -338,6 +336,8 @@ meta_tile_preview_show (MetaTilePreview *preview,
gdk_window_shape_combine_region (window, outer_region, 0, 0);
gdk_region_destroy (outer_region);
#endif
+ } else {
+ gdk_window_shape_combine_region (window, NULL, 0, 0);
}
}