1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-09 07:14:18 +01:00

fixed scroller bug when displaying scroller before

setting initial values
This commit is contained in:
kojima
2001-02-25 20:47:04 +00:00
parent 054d7cc006
commit 64defd4d22
5 changed files with 34 additions and 6 deletions

View File

@@ -483,6 +483,25 @@ WMCreateInputPanel(WMScreen *scrPtr, WMWindow *owner, char *title, char *msg,
static void
handleKeyPress3(XEvent *event, void *clientData)
{
WMGenericPanel *panel = (WMAlertPanel*)clientData;
KeySym ksym;
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
if (ksym == XK_Return && panel->defBtn) {
WMPerformButtonClick(panel->defBtn);
} else if (ksym == XK_Escape) {
if (panel->altBtn) {
WMPerformButtonClick(panel->altBtn);
} else {
panel->result = WAPRDefault;
WMBreakModalLoop(WMWidgetScreen(panel->win));
}
}
}
void
@@ -618,8 +637,8 @@ WMCreateGenericPanel(WMScreen *scrPtr, WMWindow *owner,
WMMapSubwidgets(hbox);
// WMCreateEventHandler(W_VIEW(panel->win), KeyPressMask,
// handleKeyPress3, panel);
WMCreateEventHandler(W_VIEW(panel->win), KeyPressMask,
handleKeyPress3, panel);
WMRealizeWidget(panel->win);
WMMapSubwidgets(panel->win);