Pass pointer to check_screen_event
This commit is contained in:
parent
ca7234b1c8
commit
e9e199c4ec
@ -167,15 +167,15 @@ void randr_update(void)
|
|||||||
XRRFreeMonitors(m);
|
XRRFreeMonitors(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
void screen_check_event(XEvent event)
|
bool screen_check_event(XEvent *ev)
|
||||||
{
|
{
|
||||||
if (XRRUpdateConfiguration(&event)) {
|
if (XRRUpdateConfiguration(ev)) {
|
||||||
LOG_D("XEvent: processing 'RRScreenChangeNotify'");
|
LOG_D("XEvent: processing 'RRScreenChangeNotify'");
|
||||||
randr_update();
|
randr_update();
|
||||||
|
|
||||||
} else {
|
return true;
|
||||||
LOG_D("XEvent: Ignoring '%d'", event.type);
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void xinerama_update(void)
|
void xinerama_update(void)
|
||||||
|
@ -18,7 +18,7 @@ struct screen_info {
|
|||||||
|
|
||||||
void init_screens(void);
|
void init_screens(void);
|
||||||
void screen_dpi_xft_cache_purge(void);
|
void screen_dpi_xft_cache_purge(void);
|
||||||
void screen_check_event(XEvent event);
|
bool screen_check_event(XEvent *ev);
|
||||||
|
|
||||||
struct screen_info *get_active_screen(void);
|
struct screen_info *get_active_screen(void);
|
||||||
double screen_dpi_get(struct screen_info *scr);
|
double screen_dpi_get(struct screen_info *scr);
|
||||||
|
@ -355,7 +355,10 @@ gboolean x_mainloop_fd_dispatch(GSource *source, GSourceFunc callback, gpointer
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
screen_check_event(ev);
|
if (!screen_check_event(&ev)) {
|
||||||
|
LOG_D("XEvent: Ignoring '%d'", ev.type);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user