summaryrefslogtreecommitdiffstats
path: root/window.h
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2014-07-28 20:36:32 +0200
committerBert Münnich <ber.t@posteo.de>2014-07-28 20:36:32 +0200
commitbb6721549b30c33b0080975aa19a0b02a916c7e5 (patch)
tree5836842e5120d9dcdeee1e0efaf94c34d35a04e2 /window.h
parent5e481912ec983be89f10cbbb21561ed7cc898027 (diff)
downloadnsxiv-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.h10
1 files changed, 6 insertions, 4 deletions
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;
@@ -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*);