Hi,

My current goal is to make possible render in OpenGL mode background not
using AG window system (but with event processor too). Why no ag window
with AG_WINDOW_KEEPBELOW?  AG_WINDOW_KEEPBELOW don't make possible to
process key events (i.e be "stay below" and take focus) :(. For this I
wrote own eventloop and event processor. I use AG_ProcessEvent to
dispatch event to AG system when not background active (background is
like virtual window). All work, but I can't access to globalKey to make
possible using sing global key table for AG windows and background. So I
request some function like this:

────────8<────[ CUT AG_ProcessGlobalKey]────8<─────────────

int AG_ProcessGlobalKey()
{
    struct ag_global_key *gk;
    int globalFound = 0;

    AG_MutexLock(&agGlobalKeysLock);
    SLIST_FOREACH(gk, &agGlobalKeys, gkeys) {
        if (gk->keysym == ev->key.keysym.sym &&
            (gk->keymod == KMOD_NONE ||
             ev->key.keysym.mod & gk->keymod)) {
            if (gk->fn != NULL) {
                gk->fn();
            } else if (gk->fn_ev != NULL) {
                gk->fn_ev(NULL);
            }
            globalFound = 1;
        }
    }
    AG_MutexUnlock(&agGlobalKeysLock);
    return globalFound;
}

────────>8────[ /CUT AG_ProcessGlobalKey]────>8────────────

This will be good for using this in AG_ProcessEvent and in custom event

--
 Olexandr

_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html

Reply via email to