X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=spectrwm.c;h=a4c7ee1d4b833b9aea45a32c0e271c861ec883f1;hb=9a52bb6bc226793726ef4d814e09f08031e8d918;hp=dff8f8da49a34f8f563eaea77b2de1d9b92be07c;hpb=409634cf4a48d8f63c3d85728923ea4ae92cbc58;p=spectrwm.git diff --git a/spectrwm.c b/spectrwm.c index dff8f8d..a4c7ee1 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -156,8 +156,16 @@ static const char *buildstr = SPECTRWM_VERSION; #define SWM_DEBUG #ifdef SWM_DEBUG -#define DPRINTF(x...) do { if (swm_debug) fprintf(stderr, x); } while (0) -#define DNPRINTF(n,x...) do { if (swm_debug & n) { fprintf(stderr, "%ld ", (long)time(NULL)); fprintf(stderr, x); } } while (0) +#define DPRINTF(x...) do { \ + if (swm_debug) \ + fprintf(stderr, x); \ +} while (0) +#define DNPRINTF(n,x...) do { \ + if (swm_debug & n) { \ + fprintf(stderr, "%ld ", (long)(time(NULL) - time_started)); \ + fprintf(stderr, x); \ + } \ +} while (0) #define SWM_D_MISC 0x0001 #define SWM_D_EVENT 0x0002 #define SWM_D_WS 0x0004 @@ -343,6 +351,7 @@ int spawn_position = SWM_STACK_TOP; int disable_border = 0; int border_width = 1; int verbose_layout = 0; +time_t time_started; pid_t bar_pid; XFontSet bar_fs; XFontSetExtents *bar_fs_extents; @@ -4257,6 +4266,7 @@ resize(struct ws_win *win, union arg *args) return; } + xcb_flush(conn); buttonrelease = 0; while ((evt = xcb_poll_for_event(conn)) && buttonrelease != 1) { /* @@ -4450,6 +4460,7 @@ move(struct ws_win *win, union arg *args) return; } + xcb_flush(conn); buttonrelease = 0; while ((evt = xcb_poll_for_event(conn)) && buttonrelease != 1) { /* @@ -7603,6 +7614,8 @@ main(int argc, char *argv[]) struct sigaction sact; xcb_generic_event_t *evt; + time_started = time(NULL); + start_argv = argv; warnx("Welcome to spectrwm V%s Build: %s", SPECTRWM_VERSION, buildstr); if (!setlocale(LC_CTYPE, "") || !setlocale(LC_TIME, "") ||