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); } }
static void unhideHereCallback(WMenu *menu, WMenuEntry *entry) { WApplication *wapp = (WApplication*)entry->clientdata; wUnhideApplication(wapp, False, True); }
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); }
static void unhideHereCallback(WMenu *menu, WMenuEntry *entry) { WApplication *wapp = (WApplication *) entry->clientdata; /* Parameter not used, but tell the compiler that it is ok */ (void) menu; wUnhideApplication(wapp, False, True); }
static void hideCallback(WMenu *menu, WMenuEntry *entry) { WApplication *wapp = (WApplication *) entry->clientdata; if (wapp->flags.hidden) { wWorkspaceChange(menu->vscr, wapp->last_workspace); wUnhideApplication(wapp, False, False); } else { wHideApplication(wapp); } }