comparison libvo/x11_common.c @ 29263:0f1b5b68af32

whitespace cosmetics: Remove all trailing whitespace.
author diego
date Wed, 13 May 2009 02:58:57 +0000
parents bd24ac0d9fd8
children 183e5a970176
comparison
equal deleted inserted replaced
29262:7d545a6b8aff 29263:0f1b5b68af32
334 wm ^= vo_wm_LAYER; 334 wm ^= vo_wm_LAYER;
335 mp_msg(MSGT_VO, MSGL_V, 335 mp_msg(MSGT_VO, MSGL_V,
336 "[x11] Using workaround for Metacity bugs.\n"); 336 "[x11] Using workaround for Metacity bugs.\n");
337 } 337 }
338 } 338 }
339 // --- netwm 339 // --- netwm
340 if (x11_get_property(XA_NET_SUPPORTED, &args, &nitems)) 340 if (x11_get_property(XA_NET_SUPPORTED, &args, &nitems))
341 { 341 {
342 mp_msg(MSGT_VO, MSGL_V, "[x11] Detected wm supports NetWM.\n"); 342 mp_msg(MSGT_VO, MSGL_V, "[x11] Detected wm supports NetWM.\n");
343 for (i = 0; i < nitems; i++) 343 for (i = 0; i < nitems; i++)
344 wm |= net_wm_support_state_test(args[i]); 344 wm |= net_wm_support_state_test(args[i]);
414 XImage *mXImage = NULL; 414 XImage *mXImage = NULL;
415 415
416 // Window mRootWin; 416 // Window mRootWin;
417 XWindowAttributes attribs; 417 XWindowAttributes attribs;
418 char *dispName; 418 char *dispName;
419 419
420 if (vo_rootwin) 420 if (vo_rootwin)
421 WinID = 0; // use root window 421 WinID = 0; // use root window
422 422
423 if (vo_depthonscreen) 423 if (vo_depthonscreen)
424 { 424 {
607 {wsGrayInsert, KEY_KPINS}, {wsGrayEnd, KEY_KP1}, {wsGrayDown, KEY_KP2}, 607 {wsGrayInsert, KEY_KPINS}, {wsGrayEnd, KEY_KP1}, {wsGrayDown, KEY_KP2},
608 {wsGrayPgDn, KEY_KP3}, {wsGrayLeft, KEY_KP4}, {wsGray5Dup, KEY_KP5}, 608 {wsGrayPgDn, KEY_KP3}, {wsGrayLeft, KEY_KP4}, {wsGray5Dup, KEY_KP5},
609 {wsGrayRight, KEY_KP6}, {wsGrayHome, KEY_KP7}, {wsGrayUp, KEY_KP8}, 609 {wsGrayRight, KEY_KP6}, {wsGrayHome, KEY_KP7}, {wsGrayUp, KEY_KP8},
610 {wsGrayPgUp, KEY_KP9}, {wsGrayDelete, KEY_KPDEL}, 610 {wsGrayPgUp, KEY_KP9}, {wsGrayDelete, KEY_KPDEL},
611 611
612 {0, 0} 612 {0, 0}
613 }; 613 };
614 614
615 void vo_x11_putkey(int key) 615 void vo_x11_putkey(int key)
616 { 616 {
617 static const char *passthrough_keys = " -+*/<>`~!@#$%^&()_{}:;\"\',.?\\|=[]"; 617 static const char *passthrough_keys = " -+*/<>`~!@#$%^&()_{}:;\"\',.?\\|=[]";
2133 2133
2134 mp_msg( MSGT_VO, MSGL_V, "\n[xv common] " ); 2134 mp_msg( MSGT_VO, MSGL_V, "\n[xv common] " );
2135 2135
2136 switch ( xv_ck_info.source ) 2136 switch ( xv_ck_info.source )
2137 { 2137 {
2138 case CK_SRC_CUR: 2138 case CK_SRC_CUR:
2139 mp_msg( MSGT_VO, MSGL_V, "Using colorkey from Xv (0x%06lx).\n", 2139 mp_msg( MSGT_VO, MSGL_V, "Using colorkey from Xv (0x%06lx).\n",
2140 xv_colorkey ); 2140 xv_colorkey );
2141 break; 2141 break;
2142 case CK_SRC_USE: 2142 case CK_SRC_USE:
2143 if ( xv_ck_info.method == CK_METHOD_AUTOPAINT ) 2143 if ( xv_ck_info.method == CK_METHOD_AUTOPAINT )
2196 { 2196 {
2197 /* check if we should use the colorkey specified in vo_colorkey */ 2197 /* check if we should use the colorkey specified in vo_colorkey */
2198 if ( xv_ck_info.source != CK_SRC_CUR ) 2198 if ( xv_ck_info.source != CK_SRC_CUR )
2199 { 2199 {
2200 xv_colorkey = vo_colorkey; 2200 xv_colorkey = vo_colorkey;
2201 2201
2202 /* check if we have to set the colorkey too */ 2202 /* check if we have to set the colorkey too */
2203 if ( xv_ck_info.source == CK_SRC_SET ) 2203 if ( xv_ck_info.source == CK_SRC_SET )
2204 { 2204 {
2205 xv_atom = XInternAtom(mDisplay, "XV_COLORKEY",False); 2205 xv_atom = XInternAtom(mDisplay, "XV_COLORKEY",False);
2206 2206
2207 rez = XvSetPortAttribute( mDisplay, xv_port, xv_atom, vo_colorkey ); 2207 rez = XvSetPortAttribute( mDisplay, xv_port, xv_atom, vo_colorkey );
2208 if ( rez != Success ) 2208 if ( rez != Success )
2209 { 2209 {
2210 mp_msg( MSGT_VO, MSGL_FATAL, 2210 mp_msg( MSGT_VO, MSGL_FATAL,
2211 "[xv common] Couldn't set colorkey!\n" ); 2211 "[xv common] Couldn't set colorkey!\n" );
2212 return 0; // error setting colorkey 2212 return 0; // error setting colorkey
2213 } 2213 }
2214 } 2214 }
2215 } 2215 }
2216 else 2216 else
2217 { 2217 {
2218 int colorkey_ret; 2218 int colorkey_ret;
2219 2219
2220 rez=XvGetPortAttribute(mDisplay,xv_port, xv_atom, &colorkey_ret); 2220 rez=XvGetPortAttribute(mDisplay,xv_port, xv_atom, &colorkey_ret);
2221 if ( rez == Success ) 2221 if ( rez == Success )
2229 "Maybe the selected Xv port has no overlay.\n" ); 2229 "Maybe the selected Xv port has no overlay.\n" );
2230 return 0; // error getting colorkey 2230 return 0; // error getting colorkey
2231 } 2231 }
2232 } 2232 }
2233 2233
2234 xv_atom = xv_intern_atom_if_exists( "XV_AUTOPAINT_COLORKEY" ); 2234 xv_atom = xv_intern_atom_if_exists( "XV_AUTOPAINT_COLORKEY" );
2235 2235
2236 /* should we draw the colorkey ourselves or activate autopainting? */ 2236 /* should we draw the colorkey ourselves or activate autopainting? */
2237 if ( xv_ck_info.method == CK_METHOD_AUTOPAINT ) 2237 if ( xv_ck_info.method == CK_METHOD_AUTOPAINT )
2238 { 2238 {
2239 rez = !Success; // reset rez to something different than Success 2239 rez = !Success; // reset rez to something different than Success
2240 2240
2241 if ( xv_atom != None ) // autopaint is supported 2241 if ( xv_atom != None ) // autopaint is supported
2242 { 2242 {
2243 rez = XvSetPortAttribute( mDisplay, xv_port, xv_atom, 1 ); 2243 rez = XvSetPortAttribute( mDisplay, xv_port, xv_atom, 1 );
2244 } 2244 }
2245 2245
2379 xv_ck_info.method = CK_METHOD_BACKGROUND; 2379 xv_ck_info.method = CK_METHOD_BACKGROUND;
2380 } 2380 }
2381 else if ( strncmp( ck_method_str, "man", 3 ) == 0 ) 2381 else if ( strncmp( ck_method_str, "man", 3 ) == 0 )
2382 { 2382 {
2383 xv_ck_info.method = CK_METHOD_MANUALFILL; 2383 xv_ck_info.method = CK_METHOD_MANUALFILL;
2384 } 2384 }
2385 else if ( strncmp( ck_method_str, "auto", 4 ) == 0 ) 2385 else if ( strncmp( ck_method_str, "auto", 4 ) == 0 )
2386 { 2386 {
2387 xv_ck_info.method = CK_METHOD_AUTOPAINT; 2387 xv_ck_info.method = CK_METHOD_AUTOPAINT;
2388 } 2388 }
2389 } 2389 }
2390 } 2390 }
2391 2391
2392 #endif 2392 #endif