diff options
author | Bert Münnich <ber.t@posteo.de> | 2014-07-28 20:36:32 +0200 |
---|---|---|
committer | Bert Münnich <ber.t@posteo.de> | 2014-07-28 20:36:32 +0200 |
commit | bb6721549b30c33b0080975aa19a0b02a916c7e5 (patch) | |
tree | 5836842e5120d9dcdeee1e0efaf94c34d35a04e2 /window.h | |
parent | 5e481912ec983be89f10cbbb21561ed7cc898027 (diff) | |
download | nsxiv-bb6721549b30c33b0080975aa19a0b02a916c7e5.tar.zst |
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
Diffstat (limited to 'window.h')
-rw-r--r-- | window.h | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -56,7 +56,6 @@ typedef struct { unsigned long bgcol; unsigned long fscol; unsigned long selcol; - Pixmap pm; int x; int y; @@ -67,6 +66,12 @@ typedef struct { bool fullscreen; struct { + int w; + int h; + Pixmap pm; + } buf; + + struct { unsigned int h; char l[BAR_L_LEN]; char r[BAR_R_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*); |