Event: Handle xrandr with event_handle

This commit is contained in:
Martin Duquesnoy
2011-06-05 16:37:00 +02:00
parent 860a1a2c11
commit a06e0daa5a
7 changed files with 19 additions and 21 deletions

View File

@@ -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;
}