re-implement support for MappingNotifys

This commit is contained in:
Michael Stapelberg 2011-03-14 17:20:04 +01:00
parent 01365edb30
commit 89ef41dadf
3 changed files with 17 additions and 16 deletions

View File

@ -41,7 +41,6 @@ int handle_enter_notify(void *ignored, xcb_connection_t *conn,
int handle_motion_notify(void *ignored, xcb_connection_t *conn,
xcb_motion_notify_event_t *event);
#if 0
/**
* Called when the keyboard mapping changes (for example by using Xmodmap),
* we need to update our key bindings then (re-translate symbols).
@ -49,6 +48,7 @@ int handle_motion_notify(void *ignored, xcb_connection_t *conn,
*/
int handle_mapping_notify(void *ignored, xcb_connection_t *conn,
xcb_mapping_notify_event_t *event);
#if 0
/**
* Checks if the button press was on a stack window, handles focus setting and

View File

@ -251,7 +251,6 @@ int handle_motion_notify(void *ignored, xcb_connection_t *conn, xcb_motion_notif
return 1;
}
#if 0
/*
* Called when the keyboard mapping changes (for example by using Xmodmap),
* we need to update our key bindings then (re-translate symbols).
@ -274,7 +273,6 @@ int handle_mapping_notify(void *ignored, xcb_connection_t *conn, xcb_mapping_not
return 0;
}
#endif
/*
* A new window appeared on the screen (=was mapped), so lets manage it.
*

View File

@ -417,6 +417,9 @@ int main(int argc, char *argv[]) {
/* Watch WM_TRANSIENT_FOR property (to which client this popup window belongs) */
xcb_property_set_handler(&prophs, WM_TRANSIENT_FOR, UINT_MAX, handle_transient_for, NULL);
/* Mapping notify = keyboard mapping changed (Xmodmap), re-grab bindings */
xcb_event_set_mapping_notify_handler(&evenths, handle_mapping_notify, NULL);
/* Set up the atoms we support */
xcb_change_property(conn, XCB_PROP_MODE_REPLACE, root, atoms[_NET_SUPPORTED], ATOM, 32, 7, atoms);
/* Set up the window managers name */