aboutsummaryrefslogtreecommitdiff
path: root/modules/benchmark/guibench.c
diff options
context:
space:
mode:
authorhwspeedy <ns@bigbear.dk>2024-05-28 05:45:35 +0200
committerhwspeedy <ns@bigbear.dk>2024-05-28 05:45:35 +0200
commit244f4a1d8672117375c210bc299d41b12f0ddf42 (patch)
treee5929e92f391f199c68520edefafcd2c6d380a19 /modules/benchmark/guibench.c
parent51a1e4707843169876bade6c62452ba9772ff1c9 (diff)
FIX Backporting theme changes
Diffstat (limited to 'modules/benchmark/guibench.c')
-rw-r--r--modules/benchmark/guibench.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/benchmark/guibench.c b/modules/benchmark/guibench.c
index 8db38ffa..b5b8b27a 100644
--- a/modules/benchmark/guibench.c
+++ b/modules/benchmark/guibench.c
@@ -20,6 +20,7 @@
#include <cairo.h>
#include <stdio.h>
#include <string.h>
+#include <gio/gio.h>
#include "iconcache.h"
#include "config.h"
@@ -47,7 +48,6 @@ gboolean on_draw (GtkWidget *widget, GdkEventExpose *event, gpointer data) {
cairo_t * cr;
GdkWindow* window = gtk_widget_get_window(widget);
-
#if GTK_CHECK_VERSION(3,22,0)
cairo_region_t * cairoRegion = cairo_region_create();
GdkDrawingContext * drawingContext;
@@ -132,7 +132,6 @@ double guibench(double *frameTime, int *frameCount)
{
GtkWindow * window;
-
frametime=frameTime;
framecount=frameCount;
@@ -151,11 +150,13 @@ double guibench(double *frameTime, int *frameCount)
g_signal_connect(window, "destroy", gtk_main_quit, NULL);
//Get DarkMode state from system
+#if GTK_CHECK_VERSION(3,0,0)
GtkStyleContext *sctx=gtk_widget_get_style_context(GTK_WIDGET(window));
GdkRGBA color;
gtk_style_context_lookup_color(sctx, "theme_bg_color", &color);
darkmode=0;
if((color.red+color.green+color.blue)<=1.5) darkmode=1;
+#endif
// create the are we can draw in
GtkDrawingArea* drawingArea;