forked from e16/e16
1
0
Fork 0

Wed Sep 22 09:33:27 PDT 1999

(Raster)

fix the focus fixup - shoudl let focus change as per before AND fix up
transient focus errors too... i hope.. needs some testing.

added "set focus to logout are you ssure" dialog and make sure it accepts the
standard retrun/escape keybindings for "yes/no" like the settings dialogs do.


SVN revision: 365
This commit is contained in:
Carsten Haitzler 1999-09-22 16:27:50 +00:00
parent f93a5f8c22
commit 61c2190082
4 changed files with 47 additions and 16 deletions

View File

@ -2159,3 +2159,14 @@ Tue Sep 21 23:17:24 PDT 1999
(Raster)
only allow one "default group settings" configuration dialog at a time
-------------------------------------------------------------------------------
Wed Sep 22 09:33:27 PDT 1999
(Raster)
fix the focus fixup - shoudl let focus change as per before AND fix up
transient focus errors too... i hope.. needs some testing.
added "set focus to logout are you ssure" dialog and make sure it accepts the
standard retrun/escape keybindings for "yes/no" like the settings dialogs do.

View File

@ -1423,7 +1423,7 @@ CreateEwin()
XChangeWindowAttributes(disp, ewin->win_container,
CWEventMask | CWDontPropagate, &att);
EMapWindow(disp, ewin->win_container);
if (mode.focusmode == FOCUS_CLICK)
if ((mode.clickalways) || (mode.focusmode == FOCUS_CLICK))
XGrabButton(disp, AnyButton, 0, ewin->win_container, False,
ButtonPressMask,
GrabModeSync, GrabModeAsync, None, None);

View File

@ -14,26 +14,18 @@ FixUpBadFocus(int val, void *data)
if (mode.focusmode == FOCUS_CLICK)
return;
XGetInputFocus(disp, &win, &revert);
ewin = GetEwinPointerInClient();
if ((!ewin) && (mode.focusmode = FOCUS_POINTER))
{
ewin = FindItem("", win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
if (ewin)
{
XSetInputFocus(disp, root.win, RevertToPointerRoot, CurrentTime);
mode.focuswin = NULL;
mode.realfocuswin = NULL;
mode.context_ewin = NULL;
if (mode.kde_support)
KDE_UpdateFocusedWindow();
}
return;
}
ewin = FindItem("", win, LIST_FINDBY_ID, LIST_TYPE_EWIN);
if (ewin)
{
if (win != ewin->client.win)
XSetInputFocus(disp, ewin->client.win, RevertToPointerRoot, CurrentTime);
mode.focuswin = NULL;
mode.realfocuswin = NULL;
mode.context_ewin = NULL;
if (mode.kde_support)
KDE_UpdateFocusedWindow();
}
return;
val = 0;
data = NULL;
}

View File

@ -470,6 +470,14 @@ LogoutCB(int val, void *data)
data = NULL;
}
static void CB_SettingsEscape(int val, void *data);
static void
CB_SettingsEscape(int val, void *data)
{
DialogClose((Dialog *) data);
val = 0;
}
/* This is the original code from actions.c(doExit). */
void
doSMExit(void *params)
@ -584,6 +592,7 @@ doSMExit(void *params)
else if (!strcmp(s, "logout"))
{
Dialog *d;
EWin *ewin;
AUDIO_PLAY("SOUND_LOGOUT");
d = CreateDialog("LOGOUT_DIALOG");
@ -597,7 +606,12 @@ doSMExit(void *params)
);
DialogAddButton(d, " Yes, Log Out ", LogoutCB, 1);
DialogAddButton(d, " No ", NULL, 1);
DialogBindKey(d, "Escape", CB_SettingsEscape, 0, d);
DialogBindKey(d, "Return", LogoutCB, 0, d);
ShowDialog(d);
ewin = FindEwinByDialog(d);
if (ewin)
FocusToEWin(ewin);
return;
}
}
@ -1077,6 +1091,14 @@ SaveSession(int shutdown)
}
}
static void CB_SettingsEscape(int val, void *data);
static void
CB_SettingsEscape(int val, void *data)
{
DialogClose((Dialog *) data);
val = 0;
}
/*
* Normally, the SM will throw away all the session data for a client
* that breaks its connection unexpectedly. In order to avoid this we
@ -1163,6 +1185,7 @@ doSMExit(void *params)
else if (!strcmp(s, "logout"))
{
Dialog *d;
EWin *ewin;
d = CreateDialog("LOGOUT_DIALOG");
DialogSetTitle(d, "Are you sure?");
@ -1175,7 +1198,12 @@ doSMExit(void *params)
);
DialogAddButton(d, " Yes, Log Out ", LogoutCB, 1);
DialogAddButton(d, " No ", NULL, 1);
DialogBindKey(d, "Escape", CB_SettingsEscape, 1, d);
DialogBindKey(d, "Return", LogoutCB, 0, d);
ShowDialog(d);
ewin = FindEwinByDialog(d);
if (ewin)
FocusToEWin(ewin);
return;
}
else if (!strcmp(s, "restart_wm"))