mirror of
https://github.com/0intro/wmii
synced 2025-03-01 04:34:11 +03:00
Suppress duplicate ScreenChange events.
This commit is contained in:
parent
abc4b2e285
commit
8cc2df7ab8
@ -4,11 +4,12 @@ enum DebugOpt {
|
||||
D9p = 1<<0,
|
||||
DDnd = 1<<1,
|
||||
DEvent = 1<<2,
|
||||
DEwmh = 1<<3,
|
||||
DFocus = 1<<4,
|
||||
DGeneric= 1<<5,
|
||||
DStack = 1<<6,
|
||||
NDebugOpt = 7,
|
||||
DEvents = 1<<3,
|
||||
DEwmh = 1<<4,
|
||||
DFocus = 1<<5,
|
||||
DGeneric= 1<<6,
|
||||
DStack = 1<<7,
|
||||
NDebugOpt = 8,
|
||||
};
|
||||
|
||||
#define Debug(x) if(((debugflag|debugfile)&(x)) && setdebug(x))
|
||||
|
@ -155,6 +155,7 @@ event(const char *format, ...) {
|
||||
va_end(ap);
|
||||
|
||||
ixp_pending_write(&events, buffer, strlen(buffer));
|
||||
Dprint(DEvents, "%s", buffer);
|
||||
}
|
||||
|
||||
static int dflags;
|
||||
|
@ -160,6 +160,7 @@ regerror(char *err) {
|
||||
|
||||
void
|
||||
init_screens(void) {
|
||||
static int old_n, old_nscreens;
|
||||
Rectangle *rects;
|
||||
View *v;
|
||||
int i, n, m;
|
||||
@ -216,7 +217,10 @@ init_screens(void) {
|
||||
if(selview)
|
||||
view_update(selview);
|
||||
|
||||
event("ScreenChange %d %d\n", n, nscreens);
|
||||
if (old_n != n || old_nscreens != nscreens)
|
||||
event("ScreenChange %d %d\n", n, nscreens);
|
||||
old_n = n;
|
||||
old_nscreens = nscreens;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -113,6 +113,7 @@ char* debugtab[] = {
|
||||
"9p",
|
||||
"dnd",
|
||||
"event",
|
||||
"events",
|
||||
"ewmh",
|
||||
"focus",
|
||||
"generic",
|
||||
|
Loading…
x
Reference in New Issue
Block a user