Exemplo n.º 1
0
static void netwm_active_window_rq(WClientWin *cwin, 
                                   const XClientMessageEvent *ev)
{
    long source=ev->data.l[0];
    /**
     * By default we ignore non-pager activity requests, as they're known to 
     * steal focus from newly-created windows :(
     */
    bool ignore=source!=SOURCE_PAGER;
    
    extl_table_gets_b(cwin->proptab, "ignore_net_active_window", &ignore);
    
    if(!ignore)
        region_goto((WRegion*)cwin);
    else
        region_set_activity((WRegion*)cwin, SETPARAM_SET);
}
Exemplo n.º 2
0
void region_got_focus(WRegion *reg)
{
    WRegion *par;
    
    check_clear_await(reg);
    
    region_set_activity(reg, SETPARAM_UNSET);

    if(reg->active_sub==NULL)
    {
      /* I update the current focus indicator right now. The focuslist is
       * updated on a timer to keep the list ordered by importance (to keep
       * windows that the user quickly cycles through at the bottom of the list) */
      ioncore_g.focus_current = reg;
      schedule_focuslist_insert_timer(reg);
    }
    
    if(!REGION_IS_ACTIVE(reg)){
        D(fprintf(stderr, "got focus (inact) %s [%p]\n", OBJ_TYPESTR(reg), reg);)
Exemplo n.º 3
0
bool region_set_activity_extl(WRegion *reg, const char *how)
{
    return region_set_activity(reg, libtu_string_to_setparam(how));
}