- Fixed dock's menu mapping position when dock is on the right side.
[wmaker-crm.git] / src / application.h
blob6bb1fc23a0cc6b80ac8fc19a555642d20c80437b
1 /*
2 * Window Maker window manager
3 *
4 * Copyright (c) 1997-2002 Alfredo K. Kojima
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19 * USA.
23 #ifndef WMAPPLICATION_H_
24 #define WMAPPLICATION_H_
26 /* for tracking single application instances */
27 typedef struct WApplication {
28 struct WApplication *next;
29 struct WApplication *prev;
31 Window main_window; /* ID of the group leader */
33 struct WWindow *main_window_desc; /* main (leader) window descriptor */
35 WMenu *menu; /* application menu */
37 struct WAppIcon *app_icon;
39 int refcount;
41 struct WWindow *last_focused; /* focused window before hide */
43 int last_workspace; /* last workspace used to work on the
44 * app */
45 struct {
46 unsigned int skip_next_animation:1;
47 unsigned int hidden:1;
48 unsigned int emulated:1;
49 } flags;
50 } WApplication;
53 WApplication *wApplicationCreate(WScreen *scr, Window main_window);
54 void wApplicationDestroy(WApplication *wapp);
56 WApplication *wApplicationOf(Window window);
58 void wApplicationExtractDirPackIcon(WScreen *scr,char *path, char *wm_instance,
59 char *wm_class);
61 #ifdef NEWAPPICON
63 # define wApplicationActivate(wapp) {\
64 wapp->main_window_desc->flags.focused=1; \
65 wAppIconPaint(wapp->app_icon);\
67 #define wApplicationDeactivate(wapp) {\
68 wapp->main_window_desc->flags.focused=0;\
69 wAppIconPaint(wapp->app_icon);\
71 #endif
73 #endif