summaryrefslogtreecommitdiff
path: root/typing-break/drw-utils.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2018-08-25 21:35:31 -0400
committerVictor Kareh <[email protected]>2018-08-25 21:35:31 -0400
commit8c4ebefafff7534e452e3e12e74ec8eee96de5fa (patch)
tree5b728a7e7e94e28d14fd768fdb584486723710ab /typing-break/drw-utils.c
parent19fdb3f9f84b9354c24d1ec58e43ea9d4d575c3f (diff)
downloadmate-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.c11
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);