Changeset 898e4eb8e5b95621e3318ca8aa5a23661f389e2e
- Timestamp:
- 01/20/08 22:25:24
(8 months ago)
- Author:
- Rafaël Carré <funman@videolan.org>
- git-committer:
- Rafaël Carré <funman@videolan.org> 1200864324 +0000
- git-parent:
[e033388de62713a6ca424be46550f20f3561715b]
- git-author:
- Rafaël Carré <funman@videolan.org> 1200864324 +0000
- Message:
X11 video output: give the focus to the video window when going fullscreen, that helps having the video on top of other windows in some situations
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rb55763d |
r898e4eb |
|
| 500 | 500 | DisablePixelDoubling(p_vout); |
|---|
| 501 | 501 | #endif |
|---|
| 502 | | |
|---|
| | 502 | |
|---|
| 503 | 503 | DestroyCursor( p_vout ); |
|---|
| 504 | 504 | EnableXScreenSaver( p_vout ); |
|---|
| … | … | |
| 2249 | 2249 | EnablePixelDoubling( p_vout ); |
|---|
| 2250 | 2250 | #endif |
|---|
| 2251 | | |
|---|
| | 2251 | |
|---|
| | 2252 | /* Activate the window (give it the focus) */ |
|---|
| | 2253 | XClientMessageEvent event; |
|---|
| | 2254 | |
|---|
| | 2255 | memset( &event, 0, sizeof( XClientMessageEvent ) ); |
|---|
| | 2256 | |
|---|
| | 2257 | event.type = ClientMessage; |
|---|
| | 2258 | event.message_type = |
|---|
| | 2259 | XInternAtom( p_vout->p_sys->p_display, "_NET_ACTIVE_WINDOW", False ); |
|---|
| | 2260 | event.display = p_vout->p_sys->p_display; |
|---|
| | 2261 | event.window = p_vout->p_sys->p_win->base_window; |
|---|
| | 2262 | event.format = 32; |
|---|
| | 2263 | event.data.l[ 0 ] = 1; /* source indication (1 = from an application */ |
|---|
| | 2264 | event.data.l[ 1 ] = 0; /* timestamp */ |
|---|
| | 2265 | event.data.l[ 2 ] = 0; /* requestor's currently active window */ |
|---|
| | 2266 | /* XXX: window manager would be more likely to obey if we already have |
|---|
| | 2267 | * an active window (and give it to the event), such as an interface */ |
|---|
| | 2268 | |
|---|
| | 2269 | XSendEvent( p_vout->p_sys->p_display, |
|---|
| | 2270 | DefaultRootWindow( p_vout->p_sys->p_display ), |
|---|
| | 2271 | False, SubstructureRedirectMask, |
|---|
| | 2272 | (XEvent*)&event ); |
|---|
| 2252 | 2273 | } |
|---|
| 2253 | 2274 | else |
|---|
| … | … | |
| 3110 | 3131 | p_args.p_atom = NULL; |
|---|
| 3111 | 3132 | |
|---|
| 3112 | | p_vout->p_sys->b_net_wm_state_fullscreen = VLC_FALSE; |
|---|
| 3113 | | p_vout->p_sys->b_net_wm_state_above = VLC_FALSE; |
|---|
| 3114 | | p_vout->p_sys->b_net_wm_state_below = VLC_FALSE; |
|---|
| 3115 | | p_vout->p_sys->b_net_wm_state_stays_on_top = VLC_FALSE; |
|---|
| | 3133 | p_vout->p_sys->b_net_wm_state_fullscreen = |
|---|
| | 3134 | p_vout->p_sys->b_net_wm_state_above = |
|---|
| | 3135 | p_vout->p_sys->b_net_wm_state_below = |
|---|
| | 3136 | p_vout->p_sys->b_net_wm_state_stays_on_top = |
|---|
| | 3137 | VLC_FALSE; |
|---|
| 3116 | 3138 | |
|---|
| 3117 | 3139 | net_wm_supported = |
|---|