Exemple #1
0
static void
iconDblClick(WObjDescriptor *desc, XEvent *event)
{
    WAppIcon *aicon = desc->parent;
    WApplication *wapp;
    WScreen *scr = aicon->icon->core->screen_ptr;
    int unhideHere;

    assert(aicon->icon->owner!=NULL);

    wapp = wApplicationOf(aicon->icon->owner->main_window);
#ifdef DEBUG0
    if (!wapp) {
        wwarning("could not find application descriptor for app icon!!");
        return;
    }
#endif

    unhideHere = (event->xbutton.state & ShiftMask);

    /* go to the last workspace that the user worked on the app */
    if (!unhideHere && wapp->last_workspace != scr->current_workspace)
        wWorkspaceChange(scr, wapp->last_workspace);

    wUnhideApplication(wapp, event->xbutton.button==Button2, unhideHere);

    if (event->xbutton.state & MOD_MASK) {
        wHideOtherApplications(aicon->icon->owner);
    }
}
Exemple #2
0
static void iconDblClick(WObjDescriptor *desc, XEvent *event)
{
	WAppIcon *aicon = desc->parent;
	WApplication *wapp;
	virtual_screen *vscr = aicon->icon->vscr;
	int unhideHere;

	assert(aicon->icon->owner != NULL);

	wapp = wApplicationOf(aicon->icon->owner->main_window);

	if (event->xbutton.state & ControlMask) {
		relaunchApplication(wapp);
		return;
	}

	unhideHere = (event->xbutton.state & ShiftMask);
	/* go to the last workspace that the user worked on the app */
	if (!unhideHere && wapp->last_workspace != vscr->workspace.current)
		wWorkspaceChange(vscr, wapp->last_workspace);

	wUnhideApplication(wapp, event->xbutton.button == Button2, unhideHere);

	if (event->xbutton.state & MOD_MASK)
		wHideOtherApplications(aicon->icon->owner);
}