From be5412a622c0db44751fb4431464ca3aeead9e2d Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Thu, 23 May 2024 14:11:14 +0200 Subject: [PATCH] depuplication --- src/ui_x11.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui_x11.c b/src/ui_x11.c index 7416f98..e9ae118 100644 --- a/src/ui_x11.c +++ b/src/ui_x11.c @@ -3557,6 +3557,8 @@ static inline void _CreateIcon( void ) XSetFillStyle( dpy, gc, FillSolid ); } +static inline void DrawIcon( void ) { XCopyArea( dpy, icon_pix, iconW, gc, 0, 0, hp48_icon_width, hp48_icon_height, 0, 0 ); } + static void refresh_icon( void ) { int icon_state = ( ( display.on && !( ( ANN_IO & saturn.annunc ) == ANN_IO ) ) || @@ -3590,11 +3592,9 @@ static void refresh_icon( void ) } XSetFillStyle( dpy, gc, FillSolid ); if ( iconW ) - XCopyArea( dpy, icon_pix, iconW, gc, 0, 0, hp48_icon_width, hp48_icon_height, 0, 0 ); + DrawIcon(); } -static inline void DrawIcon( void ) { XCopyArea( dpy, icon_pix, iconW, gc, 0, 0, hp48_icon_width, hp48_icon_height, 0, 0 ); } - int handle_xerror( Display* _the_dpy, XErrorEvent* _eev ) { xerror_flag = true;