diff options
-rw-r--r-- | include/x11-helper.h | 2 | ||||
-rw-r--r-- | source/textbox.c | 4 | ||||
-rw-r--r-- | source/view.c | 4 | ||||
-rw-r--r-- | source/x11-helper.c | 8 |
4 files changed, 4 insertions, 14 deletions
diff --git a/include/x11-helper.h b/include/x11-helper.h index 1f60b0c7..eeb98ad2 100644 --- a/include/x11-helper.h +++ b/include/x11-helper.h @@ -164,8 +164,6 @@ void color_border ( Display *display, cairo_t *d ); void color_separator ( Display *display, cairo_t *d ); void color_cache_reset ( void ); -cairo_format_t get_format ( void ); - void x11_helper_set_cairo_rgba ( cairo_t *d, unsigned int pixel ); /*@}*/ #endif diff --git a/source/textbox.c b/source/textbox.c index d9225fb3..26d57b6a 100644 --- a/source/textbox.c +++ b/source/textbox.c @@ -90,7 +90,7 @@ textbox* textbox_create ( TextboxFlags flags, short x, short y, short w, short h tb->changed = FALSE; - tb->main_surface = cairo_image_surface_create ( get_format (), tb->widget.w, tb->widget.h ); + tb->main_surface = cairo_image_surface_create ( CAIRO_FORMAT_ARGB32, tb->widget.w, tb->widget.h ); tb->main_draw = cairo_create ( tb->main_surface ); tb->layout = pango_layout_new ( p_context ); textbox_font ( tb, tbft ); @@ -271,7 +271,7 @@ static void texbox_update ( textbox *tb ) tb->main_draw = NULL; tb->main_surface = NULL; } - tb->main_surface = cairo_image_surface_create ( get_format (), tb->widget.w, tb->widget.h ); + tb->main_surface = cairo_image_surface_create ( CAIRO_FORMAT_ARGB32, tb->widget.w, tb->widget.h ); tb->main_draw = cairo_create ( tb->main_surface ); cairo_set_operator ( tb->main_draw, CAIRO_OPERATOR_SOURCE ); diff --git a/source/view.c b/source/view.c index 2c069007..460a2487 100644 --- a/source/view.c +++ b/source/view.c @@ -884,7 +884,7 @@ void rofi_view_update ( RofiViewState *state ) return; } TICK (); - cairo_surface_t * surf = cairo_image_surface_create ( get_format (), state->w, state->h ); + cairo_surface_t * surf = cairo_image_surface_create ( CAIRO_FORMAT_ARGB32, state->w, state->h ); cairo_t *d = cairo_create ( surf ); cairo_set_operator ( d, CAIRO_OPERATOR_SOURCE ); if ( config.fake_transparency ) { @@ -1254,7 +1254,7 @@ void rofi_view_setup_fake_transparency ( Display *display, RofiViewState *state DisplayWidth ( display, screen ), DisplayHeight ( display, screen ) ); - fake_bg = cairo_image_surface_create ( get_format (), state->mon.w, state->mon.h ); + fake_bg = cairo_image_surface_create ( CAIRO_FORMAT_ARGB32, state->mon.w, state->mon.h ); cairo_t *dr = cairo_create ( fake_bg ); cairo_set_source_surface ( dr, s, -state->mon.x, -state->mon.y ); cairo_paint ( dr ); diff --git a/source/x11-helper.c b/source/x11-helper.c index 576ec72c..6171d673 100644 --- a/source/x11-helper.c +++ b/source/x11-helper.c @@ -600,14 +600,6 @@ void create_visual_and_colormap ( Display *display ) } } -cairo_format_t get_format ( void ) -{ - if ( truecolor ) { - return CAIRO_FORMAT_ARGB32; - } - return CAIRO_FORMAT_RGB24; -} - unsigned int color_get ( Display *display, const char *const name, const char * const defn ) { char *copy = g_strdup ( name ); |