diff options
author | Victor Kareh <[email protected]> | 2018-08-25 21:35:31 -0400 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2018-08-25 21:35:31 -0400 |
commit | 8c4ebefafff7534e452e3e12e74ec8eee96de5fa (patch) | |
tree | 5b728a7e7e94e28d14fd768fdb584486723710ab /typing-break/drw-utils.c | |
parent | 19fdb3f9f84b9354c24d1ec58e43ea9d4d575c3f (diff) | |
download | mate-control-center-8c4ebefafff7534e452e3e12e74ec8eee96de5fa.tar.bz2 mate-control-center-8c4ebefafff7534e452e3e12e74ec8eee96de5fa.tar.xz |
typing-break: Make images larger and load as surface
Diffstat (limited to 'typing-break/drw-utils.c')
-rw-r--r-- | typing-break/drw-utils.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/typing-break/drw-utils.c b/typing-break/drw-utils.c index 8ba53edd..bad0869e 100644 --- a/typing-break/drw-utils.c +++ b/typing-break/drw-utils.c @@ -119,14 +119,15 @@ set_pixmap_background (GtkWidget *window) GdkPixbuf *tmp_pixbuf, *pixbuf, *tile_pixbuf; GdkRectangle rect; GdkColor color; - gint width, height; + gint width, height, scale; cairo_t *cr; gtk_widget_realize (window); screen = gtk_widget_get_screen (window); - width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)); - height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)); + scale = gtk_widget_get_scale_factor (window); + width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale; + height = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale; tmp_pixbuf = gdk_pixbuf_get_from_window (gdk_screen_get_root_window (screen), 0, @@ -160,8 +161,8 @@ set_pixmap_background (GtkWidget *window) height, 0, 0, - 1, - 1, + scale, + scale, GDK_INTERP_NEAREST, 225); |