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
This commit is contained in:
10
window.h
10
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*);
|
||||
|
Reference in New Issue
Block a user