Sun Aug 10 17:26:18 CEST 2003
(Kim) Fixed focus list not always being closed when it should be. SVN revision: 7306
This commit is contained in:
parent
2be7a09860
commit
b8c38b48d7
4
BUGS
4
BUGS
|
@ -18,10 +18,10 @@ Known bugs
|
|||
- Various minor focus issues.
|
||||
Exact steps to reproduce are welcome.
|
||||
|
||||
- If the window list (Alt-Tab) gets covered, it is not redrawn when exposed.
|
||||
- If the focus list (Alt-Tab) gets covered, it is not redrawn when exposed.
|
||||
The real problem is that the window list is not supposed to get covered.
|
||||
|
||||
- The window list is sometimes not closed when it should be.
|
||||
- The focus list is sometimes not closed when it should be.
|
||||
Press Alt, press Ctrl, release Ctrl, press Tab, release Tab, release Alt.
|
||||
|
||||
|
||||
|
|
|
@ -2073,3 +2073,10 @@ BUGS: Added window list bug.
|
|||
|
||||
Minor bug fixes to maximise code.
|
||||
Spanning Xinerama screens now requires "xinerama".
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Sun Aug 10 17:26:18 CEST 2003
|
||||
(Kim)
|
||||
|
||||
Fixed focus list not always being closed when it should be.
|
||||
|
|
2
e.spec
2
e.spec
|
@ -1,7 +1,7 @@
|
|||
Summary: The Enlightenment window manager.
|
||||
Name: enlightenment
|
||||
Version: 0.16.6
|
||||
Release: 0.32
|
||||
Release: 0.33
|
||||
Copyright: BSD
|
||||
Group: User Interface/Desktops
|
||||
Source: ftp://ftp.enlightenment.org/pub/enlightenment/enlightenment-%{version}.tar.gz
|
||||
|
|
392
po/en_US.po
392
po/en_US.po
File diff suppressed because it is too large
Load Diff
392
po/pt_BR.po
392
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
3
src/E.h
3
src/E.h
|
@ -2985,12 +2985,9 @@ void SettingsMiscellaneous(void);
|
|||
|
||||
void BGSettingsGoTo(Background * bg);
|
||||
|
||||
void WarpFocusInitEvents(void);
|
||||
int WarpFocusHandleEvent(XEvent * event);
|
||||
void WarpFocus(int delta);
|
||||
void WarpFocusFinish(void);
|
||||
void WarpFocusShowTitle(EWin * ewin);
|
||||
void WarpFocusHideTitle(void);
|
||||
|
||||
/* groups.c functions */
|
||||
Group *CreateGroup(void);
|
||||
|
|
|
@ -1452,7 +1452,6 @@ GotoDesktop(int num)
|
|||
EDBUG_RETURN_;
|
||||
pdesk = desks.current;
|
||||
|
||||
WarpFocusFinish();
|
||||
if (mode.slideout)
|
||||
HideSlideout(mode.slideout, mode.context_win);
|
||||
|
||||
|
|
|
@ -671,9 +671,10 @@ HandleEvent(XEvent * ev)
|
|||
int i, num;
|
||||
|
||||
EDBUG(7, "HandleEvent");
|
||||
WarpFocusHandleEvent(ev);
|
||||
|
||||
if (ev->type == event_base_shape + ShapeNotify)
|
||||
HandleChildShapeChange(ev);
|
||||
|
||||
if ((ev->type == KeyPress) || (ev->type == KeyRelease)
|
||||
|| (ev->type == ButtonPress) || (ev->type == ButtonRelease)
|
||||
|| (ev->type == EnterNotify) || (ev->type == LeaveNotify))
|
||||
|
@ -689,6 +690,7 @@ HandleEvent(XEvent * ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
WarpFocusHandleEvent(ev);
|
||||
lst = ListItemType(&num, LIST_TYPE_ACLASS_GLOBAL);
|
||||
if (lst)
|
||||
{
|
||||
|
@ -698,8 +700,10 @@ HandleEvent(XEvent * ev)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ev->type <= 35)
|
||||
HArray[ev->type].func(ev);
|
||||
|
||||
IconboxHandleEvent(ev);
|
||||
|
||||
if (diddeskaccount)
|
||||
|
@ -707,6 +711,7 @@ HandleEvent(XEvent * ev)
|
|||
DoIn("DESKTOP_ACCOUNTING_TIMEOUT", 30.0, DeskAccountTimeout, 0, NULL);
|
||||
diddeskaccount = 0;
|
||||
}
|
||||
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
|
|
|
@ -329,8 +329,6 @@ main(int argc, char **argv)
|
|||
ec->inroot = 1;
|
||||
}
|
||||
|
||||
if (mode.display_warp < 0)
|
||||
mode.display_warp = 0;
|
||||
mode.startup = 0;
|
||||
/* SC_Kill(); */
|
||||
/* ok - paranoia - save current settings to disk */
|
||||
|
|
|
@ -341,6 +341,8 @@ static char tmp_popup_focus;
|
|||
static char tmp_owner_popup_focus;
|
||||
static char tmp_raise_focus;
|
||||
static char tmp_warp_focus;
|
||||
|
||||
#ifdef WITH_TARTY_WARP
|
||||
static char tmp_warp_after_focus;
|
||||
static char tmp_raise_after_focus;
|
||||
static char tmp_display_warp;
|
||||
|
@ -348,6 +350,7 @@ static char tmp_warpsticky;
|
|||
static char tmp_warpshaded;
|
||||
static char tmp_warpiconified;
|
||||
static char tmp_warpfocused;
|
||||
#endif
|
||||
static char tmp_clickalways;
|
||||
|
||||
static void CB_ConfigureFocus(int val, void *data);
|
||||
|
|
|
@ -380,9 +380,6 @@ SetupX()
|
|||
SubstructureNotifyMask);
|
||||
XSync(disp, False);
|
||||
mode.xselect = 0;
|
||||
/* Init XKB to pick up release of alt modifier */
|
||||
WarpFocusInitEvents();
|
||||
XSync(disp, False);
|
||||
|
||||
/* warn, if necessary about X version problems */
|
||||
if (ProtocolVersion(disp) != 11)
|
||||
|
|
108
src/warp.c
108
src/warp.c
|
@ -38,80 +38,43 @@
|
|||
|
||||
#include "E.h"
|
||||
|
||||
#define XK_MISCELLANY
|
||||
#ifdef WITH_TARTY_WARP
|
||||
#include <X11/XKBlib.h>
|
||||
#endif
|
||||
#include <X11/keysymdef.h>
|
||||
static void WarpFocusShowTitle(EWin * ewin);
|
||||
static void WarpFocusHideTitle(void);
|
||||
|
||||
static int xkbEventNumber = -1;
|
||||
static int warpFocusAltPressed = 0;
|
||||
static int warpFocusIndex = 0;
|
||||
static char warpFocusTitleShowing = 0;
|
||||
static Window warpFocusTitleWindow = 0;
|
||||
static int warptitles_num = 0;
|
||||
static Window *warptitles = NULL;
|
||||
static EWin **warptitles_ewin = NULL;
|
||||
|
||||
void
|
||||
WarpFocusInitEvents(void)
|
||||
{
|
||||
int xkbOpCode, xkbEventBase, xkbErrorBase;
|
||||
int xkbMajor, xkbMinor;
|
||||
|
||||
#ifdef WITH_TARTY_WARP
|
||||
if (XkbQueryExtension
|
||||
(disp, &xkbOpCode, &xkbEventBase, &xkbErrorBase, &xkbMajor, &xkbMinor))
|
||||
{
|
||||
xkbEventNumber = xkbEventBase + XkbEventCode;
|
||||
XkbSelectEventDetails(disp, XkbUseCoreKbd, XkbStateNotify,
|
||||
XkbAllStateComponentsMask,
|
||||
XkbAllStateComponentsMask);
|
||||
}
|
||||
else
|
||||
mode.display_warp = -1;
|
||||
#endif
|
||||
}
|
||||
static int warpFocusKey = 0;
|
||||
|
||||
int
|
||||
WarpFocusHandleEvent(XEvent * ev)
|
||||
{
|
||||
EDBUG(5, "WarpFocusHandleEvent");
|
||||
#ifdef WITH_TARTY_WARP
|
||||
if ((!mode.display_warp) || (xkbEventNumber < 0))
|
||||
{
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
if (ev->type == xkbEventNumber)
|
||||
{
|
||||
XkbEvent *xev;
|
||||
|
||||
xev = (XkbEvent *) ev;
|
||||
if (xev->any.xkb_type == XkbStateNotify)
|
||||
{
|
||||
XkbStateNotifyEvent *sn;
|
||||
KeySym keySym;
|
||||
if (!mode.display_warp)
|
||||
EDBUG_RETURN(0);
|
||||
|
||||
sn = &xev->state;
|
||||
keySym = XKeycodeToKeysym(disp, sn->keycode, 0);
|
||||
if ((keySym == XK_Alt_L) || (keySym == XK_Alt_R)
|
||||
|| (keySym == XK_Shift_L) || (keySym == XK_Shift_R)
|
||||
|| (keySym == XK_Control_L) || (keySym == XK_Control_R)
|
||||
|| (keySym == XK_Meta_L) || (keySym == XK_Meta_R)
|
||||
|| (keySym == XK_Super_L) || (keySym == XK_Super_R)
|
||||
|| (keySym == XK_Hyper_L) || (keySym == XK_Hyper_R))
|
||||
{
|
||||
int newAltPressed;
|
||||
if (ev->type != KeyPress && ev->type != KeyRelease)
|
||||
EDBUG_RETURN(0);
|
||||
|
||||
newAltPressed = (sn->event_type == KeyPress);
|
||||
if ((warpFocusAltPressed) && (!newAltPressed))
|
||||
WarpFocusFinish();
|
||||
warpFocusAltPressed = newAltPressed;
|
||||
}
|
||||
}
|
||||
EDBUG_RETURN(1);
|
||||
}
|
||||
#if 0
|
||||
printf("WarpFocusHandleEvent win=%#x key=%#x(%#x) %d\n",
|
||||
(unsigned)ev->xkey.window, ev->xkey.keycode,
|
||||
warpFocusKey, warpFocusTitleShowing);
|
||||
#endif
|
||||
if (warpFocusTitleShowing)
|
||||
{
|
||||
if (ev->xkey.keycode != warpFocusKey)
|
||||
WarpFocusFinish();
|
||||
}
|
||||
else
|
||||
{
|
||||
warpFocusKey = ev->xkey.keycode;
|
||||
}
|
||||
|
||||
EDBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -122,10 +85,10 @@ WarpFocus(int delta)
|
|||
int i, num0, num;
|
||||
|
||||
EDBUG(5, "WarpFocus");
|
||||
if ((!mode.display_warp) || (xkbEventNumber < 0))
|
||||
{
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
if (!mode.display_warp)
|
||||
EDBUG_RETURN_;
|
||||
|
||||
lst = (EWin **) ListItemType(&num, LIST_TYPE_WARP_RING);
|
||||
if (!lst)
|
||||
{
|
||||
|
@ -157,7 +120,9 @@ WarpFocus(int delta)
|
|||
lst = (EWin **) ListItemType(&num, LIST_TYPE_WARP_RING);
|
||||
warpFocusIndex = num - 1;
|
||||
}
|
||||
|
||||
ewin = NULL;
|
||||
|
||||
if (lst)
|
||||
{
|
||||
warpFocusIndex = (warpFocusIndex + num + delta) % num;
|
||||
|
@ -179,6 +144,7 @@ WarpFocus(int delta)
|
|||
WarpFocusShowTitle(ewin);
|
||||
Efree(lst);
|
||||
}
|
||||
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
|
@ -189,6 +155,7 @@ WarpFocusFinish(void)
|
|||
int num;
|
||||
|
||||
EDBUG(5, "WarpFocusFinish");
|
||||
|
||||
lst = (EWin **) ListItemType(&num, LIST_TYPE_WARP_RING);
|
||||
if (lst)
|
||||
{
|
||||
|
@ -214,10 +181,11 @@ WarpFocusFinish(void)
|
|||
Efree(lst);
|
||||
while (RemoveItem("", 0, LIST_FINDBY_NONE, LIST_TYPE_WARP_RING));
|
||||
}
|
||||
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
WarpFocusShowTitle(EWin * ewin)
|
||||
{
|
||||
TextClass *tc;
|
||||
|
@ -234,12 +202,14 @@ WarpFocusShowTitle(EWin * ewin)
|
|||
ic = FindItem("COORDS", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS);
|
||||
if ((!ic) || (!tc))
|
||||
return;
|
||||
|
||||
if (!warpFocusTitleWindow)
|
||||
warpFocusTitleWindow = ECreateWindow(root.win, 0, 0, 1, 1, 1);
|
||||
|
||||
pq = queue_up;
|
||||
queue_up = 0;
|
||||
XRaiseWindow(disp, warpFocusTitleWindow);
|
||||
|
||||
if (!warpFocusTitleShowing)
|
||||
{
|
||||
EWin **lst;
|
||||
|
@ -288,7 +258,15 @@ WarpFocusShowTitle(EWin * ewin)
|
|||
}
|
||||
PropagateShapes(warpFocusTitleWindow);
|
||||
EMapWindow(disp, warpFocusTitleWindow);
|
||||
|
||||
/*
|
||||
* Grab the keyboard. The grab is automatically released when
|
||||
* WarpFocusHideTitle unmaps warpFocusTitleWindow.
|
||||
*/
|
||||
XGrabKeyboard(disp, warpFocusTitleWindow, False, GrabModeAsync,
|
||||
GrabModeAsync, CurrentTime);
|
||||
}
|
||||
|
||||
for (i = 0; i < warptitles_num; i++)
|
||||
{
|
||||
if (!FindItem
|
||||
|
@ -312,13 +290,14 @@ WarpFocusShowTitle(EWin * ewin)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
PropagateShapes(warpFocusTitleWindow);
|
||||
queue_up = pq;
|
||||
XFlush(disp);
|
||||
warpFocusTitleShowing = 1;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
WarpFocusHideTitle(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -329,6 +308,7 @@ WarpFocusHideTitle(void)
|
|||
for (i = 0; i < warptitles_num; i++)
|
||||
EDestroyWindow(disp, warptitles[i]);
|
||||
}
|
||||
|
||||
if (warptitles)
|
||||
Efree(warptitles);
|
||||
if (warptitles_ewin)
|
||||
|
|
Loading…
Reference in New Issue