The R Project SVN R

Rev

Rev 48732 | Rev 76745 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 48732 Rev 51948
Line 324... Line 324...
324
    */
324
    */
325
}
325
}
326
 
326
 
327
static void handle_focus(object obj, int gained_focus)
327
static void handle_focus(object obj, int gained_focus)
328
{
328
{
329
    if (gained_focus)
329
    if (gained_focus) {
330
	obj->state |= Focus;
330
	obj->state |= Focus;
-
 
331
	if (obj->caretwidth < 0) {
-
 
332
	    setcaret(obj, 0,0, -obj->caretwidth, obj->caretheight);
-
 
333
	    showcaret(obj, 1);
-
 
334
	}
331
    else
335
    } else {
332
	obj->state &= ~Focus;
336
	obj->state &= ~Focus;
-
 
337
	if (obj->caretwidth > 0) {
-
 
338
	    setcaret(obj, 0,0, -obj->caretwidth, obj->caretheight);
-
 
339
	    showcaret(obj, 0);
-
 
340
	}
-
 
341
    }
333
    if ((! USE_NATIVE_BUTTONS) && (obj->kind == ButtonObject))
342
    if ((! USE_NATIVE_BUTTONS) && (obj->kind == ButtonObject))
334
	InvalidateRect(obj->handle, NULL, 0);
343
	InvalidateRect(obj->handle, NULL, 0);
335
    if (obj->call && obj->call->focus)
344
    if (obj->call && obj->call->focus)
336
	obj->call->focus(obj);
345
	obj->call->focus(obj);
337
}
346
}