From bb6721549b30c33b0080975aa19a0b02a916c7e5 Mon Sep 17 00:00:00 2001 From: Bert Münnich Date: Mon, 28 Jul 2014 20:36:32 +0200 Subject: Overhauled window drawing, yet again; fixes issue #155 - Buffer for window content is bigger than the window, minimizes artifacts when window is resized - Back to using XSetWindowBackgroundPixmap() instead of XCopyArea(), no need to handle exposure events; X server can show gray background directly after resize event before sxiv redraws the window contents --- window.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'window.h') diff --git a/window.h b/window.h index 475ae1a..d35d91e 100644 --- a/window.h +++ b/window.h @@ -56,7 +56,6 @@ typedef struct { unsigned long bgcol; unsigned long fscol; unsigned long selcol; - Pixmap pm; int x; int y; @@ -66,6 +65,12 @@ typedef struct { bool fullscreen; + struct { + int w; + int h; + Pixmap pm; + } buf; + struct { unsigned int h; char l[BAR_L_LEN]; @@ -82,7 +87,6 @@ void win_open(win_t*); void win_close(win_t*); bool win_configure(win_t*, XConfigureEvent*); -void win_expose(win_t*, XExposeEvent*); void win_toggle_fullscreen(win_t*); void win_toggle_bar(win_t*); @@ -92,8 +96,6 @@ void win_draw(win_t*); void win_draw_rect(win_t*, Pixmap, int, int, int, int, bool, int, unsigned long); -void win_update_bar(win_t*); - int win_textwidth(const char*, unsigned int, bool); void win_set_title(win_t*, const char*); -- cgit v1.2.3