Mercurial > mplayer.hg
comparison libvo/x11_common.c @ 1236:ebe9659da559
icewm basz bug fix
author | pontscho |
---|---|
date | Wed, 27 Jun 2001 08:50:03 +0000 |
parents | 4c7b219e126c |
children | 9e1b353f8171 |
comparison
equal
deleted
inserted
replaced
1235:c823cb3a2608 | 1236:ebe9659da559 |
---|---|
134 } | 134 } |
135 | 135 |
136 | 136 |
137 // ----- Motif header: ------- | 137 // ----- Motif header: ------- |
138 | 138 |
139 #define MWM_HINTS_DECORATIONS 2 | 139 #define MWM_HINTS_FUNCTIONS (1L << 0) |
140 #define MWM_HINTS_DECORATIONS (1L << 1) | |
141 #define MWM_HINTS_INPUT_MODE (1L << 2) | |
142 #define MWM_HINTS_STATUS (1L << 3) | |
143 | |
144 #define MWM_FUNC_ALL (1L << 0) | |
145 #define MWM_FUNC_RESIZE (1L << 1) | |
146 #define MWM_FUNC_MOVE (1L << 2) | |
147 #define MWM_FUNC_MINIMIZE (1L << 3) | |
148 #define MWM_FUNC_MAXIMIZE (1L << 4) | |
149 #define MWM_FUNC_CLOSE (1L << 5) | |
150 | |
151 #define MWM_DECOR_ALL (1L << 0) | |
152 #define MWM_DECOR_BORDER (1L << 1) | |
153 #define MWM_DECOR_RESIZEH (1L << 2) | |
154 #define MWM_DECOR_TITLE (1L << 3) | |
155 #define MWM_DECOR_MENU (1L << 4) | |
156 #define MWM_DECOR_MINIMIZE (1L << 5) | |
157 #define MWM_DECOR_MAXIMIZE (1L << 6) | |
158 | |
159 #define MWM_INPUT_MODELESS 0 | |
160 #define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1 | |
161 #define MWM_INPUT_SYSTEM_MODAL 2 | |
162 #define MWM_INPUT_FULL_APPLICATION_MODAL 3 | |
163 #define MWM_INPUT_APPLICATION_MODAL MWM_INPUT_PRIMARY_APPLICATION_MODAL | |
164 | |
165 #define MWM_TEAROFF_WINDOW (1L<<0) | |
140 | 166 |
141 typedef struct | 167 typedef struct |
142 { | 168 { |
143 long flags; | 169 long flags; |
144 long functions; | 170 long functions; |
145 long decorations; | 171 long decorations; |
146 long input_mode; | 172 long input_mode; |
173 long state; | |
147 } MotifWmHints; | 174 } MotifWmHints; |
148 | 175 |
149 extern MotifWmHints vo_MotifWmHints; | 176 extern MotifWmHints vo_MotifWmHints; |
150 extern Atom vo_MotifHints; | 177 extern Atom vo_MotifHints; |
151 extern int vo_depthonscreen; | 178 extern int vo_depthonscreen; |
155 static MotifWmHints vo_MotifWmHints; | 182 static MotifWmHints vo_MotifWmHints; |
156 static Atom vo_MotifHints = None; | 183 static Atom vo_MotifHints = None; |
157 | 184 |
158 void vo_x11_decoration( Display * vo_Display,Window w,int d ) | 185 void vo_x11_decoration( Display * vo_Display,Window w,int d ) |
159 { | 186 { |
160 | |
161 #if 1 | |
162 XSetWindowAttributes attr; | |
163 attr.override_redirect = True; | |
164 XChangeWindowAttributes(vo_Display, w, CWOverrideRedirect, &attr); | |
165 // XMapWindow(vo_Display], w); | |
166 #endif | |
167 | |
168 vo_MotifHints=XInternAtom( vo_Display,"_MOTIF_WM_HINTS",0 ); | 187 vo_MotifHints=XInternAtom( vo_Display,"_MOTIF_WM_HINTS",0 ); |
169 if ( vo_MotifHints != None ) | 188 if ( vo_MotifHints != None ) |
170 { | 189 { |
171 vo_MotifWmHints.flags=2; | 190 memset( &vo_MotifWmHints,0,sizeof( MotifWmHints ) ); |
172 vo_MotifWmHints.decorations=d; | 191 vo_MotifWmHints.flags=MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; |
192 vo_MotifWmHints.functions=MWM_FUNC_MOVE | MWM_FUNC_CLOSE | MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE; | |
193 if ( d ) d=MWM_DECOR_ALL; | |
194 vo_MotifWmHints.decorations=d | MWM_DECOR_MENU; | |
173 XChangeProperty( vo_Display,w,vo_MotifHints,vo_MotifHints,32, | 195 XChangeProperty( vo_Display,w,vo_MotifHints,vo_MotifHints,32, |
174 PropModeReplace,(unsigned char *)&vo_MotifWmHints,4 ); | 196 PropModeReplace,(unsigned char *)&vo_MotifWmHints,5 ); |
175 } | 197 } |
176 } | 198 } |
177 | 199 |
178 void vo_x11_classhint( Display * display,Window window,char *name ){ | 200 void vo_x11_classhint( Display * display,Window window,char *name ){ |
179 XClassHint wmClass; | 201 XClassHint wmClass; |