[gnome-flashback] screenshot: set rubberband css class in setup_window
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] screenshot: set rubberband css class in setup_window
- Date: Sat, 26 Oct 2019 09:00:06 +0000 (UTC)
commit 460fb5436b587c3271675bac46ec76d0d928a685
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Oct 26 11:58:45 2019 +0300
screenshot: set rubberband css class in setup_window
Otherwise GTK will think that window is opaque.
gnome-flashback/libscreenshot/gf-select-area.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gnome-flashback/libscreenshot/gf-select-area.c b/gnome-flashback/libscreenshot/gf-select-area.c
index 494e590..d72b052 100644
--- a/gnome-flashback/libscreenshot/gf-select-area.c
+++ b/gnome-flashback/libscreenshot/gf-select-area.c
@@ -66,14 +66,9 @@ draw_cb (GtkWidget *widget,
width = gtk_widget_get_allocated_width (widget);
height = gtk_widget_get_allocated_height (widget);
- gtk_style_context_save (context);
- gtk_style_context_add_class (context, GTK_STYLE_CLASS_RUBBERBAND);
-
gtk_render_background (context, cr, 0, 0, width, height);
gtk_render_frame (context, cr, 0, 0, width, height);
- gtk_style_context_restore (context);
-
return TRUE;
}
@@ -213,8 +208,13 @@ setup_window (GfSelectArea *select_area)
if (gdk_screen_is_composited (screen) && visual != NULL)
{
+ GtkStyleContext *context;
+
gtk_widget_set_visual (select_area->window, visual);
select_area->composited = TRUE;
+
+ context = gtk_widget_get_style_context (select_area->window);
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_RUBBERBAND);
}
g_signal_connect (select_area->window, "draw",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]