diff --git a/WINGs/wpanel.c b/WINGs/wpanel.c index e8d1767..6c8b306 100644 --- a/WINGs/wpanel.c +++ b/WINGs/wpanel.c @@ -21,10 +21,7 @@ static void alertPanelOnClick(WMWidget * self, void *clientData) static void handleKeyPress(WMEvent * event, void *clientData) { WMAlertPanel *panel = (WMAlertPanel *) clientData; - KeySym ksym; - XEvent *xev = (XEvent *)event->_x11_raw; - - XLookupString(&xev->xkey, NULL, 0, &ksym, NULL); + unsigned long ksym = event->u.key.keysym; if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) { WMPerformButtonClick(panel->defBtn); @@ -418,10 +415,7 @@ static void inputBoxOnClick(WMWidget * self, void *clientData) static void handleKeyPress2(WMEvent * event, void *clientData) { WMInputPanel *panel = (WMInputPanel *) clientData; - KeySym ksym; - XEvent *xev = (XEvent *)event->_x11_raw; - - XLookupString(&xev->xkey, NULL, 0, &ksym, NULL); + unsigned long ksym = event->u.key.keysym; if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) { WMPerformButtonClick(panel->defBtn); @@ -429,7 +423,6 @@ static void handleKeyPress2(WMEvent * event, void *clientData) if (panel->altBtn) { WMPerformButtonClick(panel->altBtn); } else { - /* printf("got esc\n"); */ WMBreakModalLoop(WMWidgetScreen(panel->win)); panel->result = WAPRDefault; } @@ -707,10 +700,7 @@ WMInputPanel *WMCreateScaledInputPanel(WMScreen * scrPtr, WMWindow * owner, cons static void handleKeyPress3(WMEvent * event, void *clientData) { WMGenericPanel *panel = (WMGenericPanel *) clientData; - KeySym ksym; - XEvent *xev = (XEvent *)event->_x11_raw; - - XLookupString(&xev->xkey, NULL, 0, &ksym, NULL); + unsigned long ksym = event->u.key.keysym; if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) { WMPerformButtonClick(panel->defBtn);