Beispiel #1
0
EAPI void
e_focus_event_mouse_down(E_Border* bd)
{
   if (e_config->focus_policy == E_FOCUS_CLICK)
     {
	e_border_focus_set(bd, 1, 1);

	if (!bd->lock_user_stacking)
	  {
	     if (e_config->border_raise_on_focus)
	       e_border_raise(bd);
	  }
     }
   else if (e_config->always_click_to_raise)
     {
	if (!bd->lock_user_stacking)
	  {
	     if (e_config->border_raise_on_focus)
	       e_border_raise(bd);
	  }
     }
   else if (e_config->always_click_to_focus)
     {
	e_border_focus_set(bd, 1, 1);
     }
}
Beispiel #2
0
/* local subsystem functions */
static Eina_Bool
_e_focus_raise_timer(void* data)
{
   E_Border *bd;

   bd = data;
   if (!bd->lock_user_stacking) e_border_raise(bd);
   bd->raise_timer = NULL;
   return ECORE_CALLBACK_CANCEL;
}
Beispiel #3
0
static void
_itask_menu_cb_item_drag_finished(E_Drag *drag, int dropped)
{
   E_Border *bd;

   bd = drag->data;
   if (!dropped)
     {
	e_border_desk_set(bd, e_desk_current_get(bd->zone));
	if(bd->iconic)
	  e_border_uniconify(bd);
	else
	  e_border_raise(bd);
     }
   e_object_unref(E_OBJECT(bd));
}
Beispiel #4
0
EAPI void
e_focus_event_mouse_down(E_Border *bd)
{
   if (!bd->focused)
     {
		if (e_border_focus_policy_click(bd))
          e_border_focus_set(bd, 1, 1);
        else if (e_config->always_click_to_focus)
          e_border_focus_set(bd, 1, 1);
     }
   if (e_config->always_click_to_raise)
     {
        if (!bd->lock_user_stacking)
            e_border_raise(bd);
     }
}
Beispiel #5
0
static void
_itask_item_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
   Evas_Event_Mouse_Up *ev;
   Itask_Item *ic;
   E_Desk *current_desk;

   ev = event_info;
   ic = data;

   ic->drag.start = 0;
   
   if ((ev->button == 1) && (!ic->drag.dnd))
     {
	if (ic->time_press + 0.3 < ecore_loop_time_get())
	  return;
	
	current_desk = e_desk_current_get(ic->border->zone);
       
	if ((ic->itask->ci->iconify_focused) &&
	    (ic->border == e_border_focused_get()))
	  {	     
	     e_border_iconify(ic->border);
	  }
	else
   	  {
	     if ((e_desk_current_get(ic->border->zone) != ic->border->desk) &&
		 (!ic->border->sticky))
	       e_desk_show(ic->border->desk);

	     if (ic->border->shaded)
	       e_border_unshade(ic->border, E_DIRECTION_UP);

	     if (ic->border->iconic)
	       e_border_uniconify(ic->border);
	     else
	       e_border_raise(ic->border);

	     e_border_focus_set(ic->border, 1, 1);
   	  }
     }
}
Beispiel #6
0
/* taken from e_int_menus */
static void
_itask_menu_item_cb(void *data, E_Menu *m, E_Menu_Item *mi)
{
   Itask_Item *ic;
   E_Border *bd;


   ic = data;
   bd = ic->border;

   E_OBJECT_CHECK(bd);
   if (bd->iconic)
     {
	if (!bd->lock_user_iconify)
	  e_border_uniconify(bd);
     }
   e_desk_show(bd->desk);
   if (!bd->lock_user_stacking)
     e_border_raise(bd);
}
Beispiel #7
0
EAPI void
e_focus_event_focus_in(E_Border *bd)
{
   if ((e_border_focus_policy_click(bd)) && 
       (!e_config->always_click_to_raise) &&
       (!e_config->always_click_to_focus))
     {
        if (!bd->button_grabbed) return;
        e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win);
        e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, bd->win);
        ecore_x_window_button_ungrab(bd->win, 1, 0, 1);
        ecore_x_window_button_ungrab(bd->win, 2, 0, 1);
        ecore_x_window_button_ungrab(bd->win, 3, 0, 1);
        e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, bd->win);
        e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, bd->win);
        bd->button_grabbed = 0;
     }
    if (!bd->lock_user_stacking)
     {
        if (e_config->border_raise_on_focus)
          e_border_raise(bd);
     }    
}
Beispiel #8
0
EAPI void
e_focus_event_mouse_in(E_Border* bd)
{
   if ((e_config->focus_policy == E_FOCUS_MOUSE) ||
       (e_config->focus_policy == E_FOCUS_SLOPPY))
     {
	e_border_focus_set(bd, 1, 1);
     }
   if (bd->raise_timer) ecore_timer_del(bd->raise_timer);
   bd->raise_timer = NULL;
   if (e_config->use_auto_raise)
     {
	if (e_config->auto_raise_delay == 0.0)
	  {
	     if (!bd->lock_user_stacking)
	       {
		  if (e_config->border_raise_on_focus)
		    e_border_raise(bd);
	       }
	  }
	else
	  bd->raise_timer = ecore_timer_add(e_config->auto_raise_delay, _e_focus_raise_timer, bd);
     }
}