Event: Handle xrandr with event_handle
This commit is contained in:
10
src/event.c
10
src/event.c
@@ -681,6 +681,12 @@ event_make_array(void)
|
||||
{
|
||||
int i = LASTEvent;
|
||||
|
||||
#ifdef HAVE_XRANDR
|
||||
i = xrandr_event + RRScreenChangeNotify;
|
||||
#endif /* HAVE_XRANDR */
|
||||
|
||||
event_handle = xcalloc((nevent = i + 1), sizeof(event_handle));
|
||||
|
||||
/* Fill array with non-used function (do nothing) */
|
||||
while(i--)
|
||||
event_handle[i] = reparentnotify;
|
||||
@@ -702,6 +708,10 @@ event_make_array(void)
|
||||
event_handle[SelectionClear] = selectionclearevent;
|
||||
event_handle[UnmapNotify] = unmapnotify;
|
||||
|
||||
#ifdef HAVE_XRANDR
|
||||
event_handle[xrandr_event + RRScreenChangeNotify] = xrandrevent;
|
||||
#endif /* HAVE_XRANDR */
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user