More fun with focus...

SVN revision: 1450
This commit is contained in:
Richard Barnes 1999-11-28 22:59:25 +00:00
parent 1a79294f41
commit 10af2854ff
2 changed files with 12 additions and 2 deletions

View File

@ -959,3 +959,10 @@ Sun Nov 28 21:05:11 EST 1999
Change to something more like ClickToFocus. The gadgets won't *keep* the focus
unless you click them. This probably needs a little more work...
-------------------------------------------------------------------------------
Sun Nov 28 21:33:53 EST 1999
(StriderZ)
More fun with focus...

View File

@ -799,6 +799,9 @@ Epplet_handle_event(XEvent * ev)
(*focusin_func) (focusin_data, ev->xfocus.window);
break;
case FocusOut:
last_gadget = NULL;
Epplet_redraw();
if (focusout_func)
(*focusout_func) (focusout_data, ev->xfocus.window);
break;
@ -1714,14 +1717,14 @@ Epplet_draw_textbox(Epplet_gadget eg)
if (to_cursor >= g->w)
{
if (g->hilited)
if ((last_gadget == g) || (g->hilited))
XFillRectangle(disp, g->win, gc, g->w - 5, 2, 5, g->h - 4);
else
XDrawRectangle(disp, g->win, gc, g->w - 5, 2, 5, g->h - 4);
}
else
{
if (g->hilited)
if ((last_gadget == g) || (g->hilited))
XFillRectangle(disp, g->win, gc, to_cursor + 2, 2, 5, g->h - 4);
else
XDrawRectangle(disp, g->win, gc, to_cursor + 2, 2, 5, g->h - 4);