Mercurial > mplayer.hg
comparison libvo/x11_common.c @ 24311:0ff0253c8e00
Cosmetics: set vo_hint.flags at more consistent places (directly before
setting the corresponding values)
author | reimar |
---|---|
date | Sun, 02 Sep 2007 22:09:55 +0000 |
parents | df05ff41590e |
children | 716b7751e7ad |
comparison
equal
deleted
inserted
replaced
24310:2da524beaf8a | 24311:0ff0253c8e00 |
---|---|
1177 } | 1177 } |
1178 } | 1178 } |
1179 | 1179 |
1180 void vo_x11_sizehint(int x, int y, int width, int height, int max) | 1180 void vo_x11_sizehint(int x, int y, int width, int height, int max) |
1181 { | 1181 { |
1182 vo_hint.flags = PPosition | PSize | PWinGravity; | 1182 vo_hint.flags = 0; |
1183 if (vo_keepaspect) | 1183 if (vo_keepaspect) |
1184 { | 1184 { |
1185 vo_hint.flags |= PAspect; | 1185 vo_hint.flags |= PAspect; |
1186 vo_hint.min_aspect.x = width; | 1186 vo_hint.min_aspect.x = width; |
1187 vo_hint.min_aspect.y = height; | 1187 vo_hint.min_aspect.y = height; |
1188 vo_hint.max_aspect.x = width; | 1188 vo_hint.max_aspect.x = width; |
1189 vo_hint.max_aspect.y = height; | 1189 vo_hint.max_aspect.y = height; |
1190 } | 1190 } |
1191 | 1191 |
1192 vo_hint.flags |= PPosition | PSize; | |
1192 vo_hint.x = x; | 1193 vo_hint.x = x; |
1193 vo_hint.y = y; | 1194 vo_hint.y = y; |
1194 vo_hint.width = width; | 1195 vo_hint.width = width; |
1195 vo_hint.height = height; | 1196 vo_hint.height = height; |
1196 if (max) | 1197 if (max) |
1197 { | 1198 { |
1199 vo_hint.flags |= PMaxSize; | |
1198 vo_hint.max_width = width; | 1200 vo_hint.max_width = width; |
1199 vo_hint.max_height = height; | 1201 vo_hint.max_height = height; |
1200 vo_hint.flags |= PMaxSize; | |
1201 } else | 1202 } else |
1202 { | 1203 { |
1203 vo_hint.max_width = 0; | 1204 vo_hint.max_width = 0; |
1204 vo_hint.max_height = 0; | 1205 vo_hint.max_height = 0; |
1205 } | 1206 } |
1206 | 1207 |
1207 // Set minimum height/width to 4 to avoid off-by-one errors | 1208 // Set minimum height/width to 4 to avoid off-by-one errors |
1208 // and because mga_vid requires a minimal size of 4 pixels. | 1209 // and because mga_vid requires a minimal size of 4 pixels. |
1210 vo_hint.flags |= PMinSize; | |
1209 vo_hint.min_width = vo_hint.min_height = 4; | 1211 vo_hint.min_width = vo_hint.min_height = 4; |
1210 vo_hint.flags |= PMinSize; | 1212 |
1211 | 1213 vo_hint.flags |= PWinGravity; |
1212 vo_hint.win_gravity = StaticGravity; | 1214 vo_hint.win_gravity = StaticGravity; |
1213 XSetWMNormalHints(mDisplay, vo_window, &vo_hint); | 1215 XSetWMNormalHints(mDisplay, vo_window, &vo_hint); |
1214 } | 1216 } |
1215 | 1217 |
1216 static int vo_x11_get_gnome_layer(Display * mDisplay, Window win) | 1218 static int vo_x11_get_gnome_layer(Display * mDisplay, Window win) |