Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
e6b4ae3e
Commit
e6b4ae3e
authored
Mar 23, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/video_output/x11/xcommon.c: use vout_RequestWindow()/vout_ReleaseWindow().
parent
36b86f5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
24 deletions
+31
-24
modules/video_output/x11/xcommon.c
modules/video_output/x11/xcommon.c
+31
-24
No files found.
modules/video_output/x11/xcommon.c
View file @
e6b4ae3e
...
...
@@ -899,12 +899,7 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )
vlc_bool_t
b_configure_notify
=
VLC_FALSE
;
vlc_bool_t
b_map_notify
=
VLC_FALSE
;
vlc_value_t
val
;
/* Prepare window manager hints and properties */
xsize_hints
.
base_width
=
p_win
->
i_width
;
xsize_hints
.
base_height
=
p_win
->
i_height
;
xsize_hints
.
flags
=
PSize
;
p_win
->
wm_protocols
=
XInternAtom
(
p_vout
->
p_sys
->
p_display
,
"WM_PROTOCOLS"
,
True
);
p_win
->
wm_delete_window
=
...
...
@@ -916,9 +911,33 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )
p_vout
->
p_sys
->
i_screen
);
xwindow_attributes
.
event_mask
=
ExposureMask
|
StructureNotifyMask
;
/* Check whether someone provided us with a window ID */
var_Get
(
p_vout
->
p_vlc
,
"drawable"
,
&
val
);
p_win
->
owner_window
=
p_vout
->
b_fullscreen
?
0
:
val
.
i_int
;
if
(
!
p_vout
->
b_fullscreen
)
{
p_win
->
owner_window
=
(
Window
)
vout_RequestWindow
(
p_vout
,
&
p_win
->
i_x
,
&
p_win
->
i_y
,
&
p_win
->
i_width
,
&
p_win
->
i_height
);
xsize_hints
.
base_width
=
xsize_hints
.
width
=
p_win
->
i_width
;
xsize_hints
.
base_height
=
xsize_hints
.
height
=
p_win
->
i_height
;
xsize_hints
.
flags
=
PSize
;
if
(
p_win
->
i_x
>=
0
||
p_win
->
i_y
>=
0
)
{
xsize_hints
.
x
=
p_win
->
i_x
;
xsize_hints
.
y
=
p_win
->
i_y
;
xsize_hints
.
flags
|=
PPosition
;
}
}
else
{
/* Fullscreen window size and position */
p_win
->
owner_window
=
0
;
p_win
->
i_x
=
p_win
->
i_y
=
0
;
p_win
->
i_width
=
DisplayWidth
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
i_screen
);
p_win
->
i_height
=
DisplayHeight
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
i_screen
);
}
if
(
!
p_win
->
owner_window
)
{
...
...
@@ -929,7 +948,7 @@ static int CreateWindow( vout_thread_t *p_vout, x11_window_t *p_win )
p_win
->
base_window
=
XCreateWindow
(
p_vout
->
p_sys
->
p_display
,
DefaultRootWindow
(
p_vout
->
p_sys
->
p_display
),
0
,
0
,
p_win
->
i_x
,
p_win
->
i_y
,
p_win
->
i_width
,
p_win
->
i_height
,
0
,
0
,
InputOutput
,
0
,
...
...
@@ -1105,6 +1124,9 @@ static void DestroyWindow( vout_thread_t *p_vout, x11_window_t *p_win )
XUnmapWindow
(
p_vout
->
p_sys
->
p_display
,
p_win
->
base_window
);
XDestroyWindow
(
p_vout
->
p_sys
->
p_display
,
p_win
->
base_window
);
if
(
p_win
->
owner_window
)
vout_ReleaseWindow
(
p_vout
,
(
void
*
)
p_win
->
owner_window
);
}
/*****************************************************************************
...
...
@@ -1300,12 +1322,6 @@ static void ToggleFullScreen ( vout_thread_t *p_vout )
p_vout
->
p_sys
->
p_win
=
&
p_vout
->
p_sys
->
fullscreen_window
;
/* fullscreen window size and position */
p_vout
->
p_sys
->
p_win
->
i_width
=
DisplayWidth
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
i_screen
);
p_vout
->
p_sys
->
p_win
->
i_height
=
DisplayHeight
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
i_screen
);
CreateWindow
(
p_vout
,
p_vout
->
p_sys
->
p_win
);
/* To my knowledge there are two ways to create a borderless window.
...
...
@@ -1369,15 +1385,6 @@ static void ToggleFullScreen ( vout_thread_t *p_vout )
DefaultRootWindow
(
p_vout
->
p_sys
->
p_display
),
0
,
0
);
/* fullscreen window size and position */
p_vout
->
p_sys
->
p_win
->
i_width
=
DisplayWidth
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
i_screen
);
p_vout
->
p_sys
->
p_win
->
i_height
=
DisplayHeight
(
p_vout
->
p_sys
->
p_display
,
p_vout
->
p_sys
->
i_screen
);
p_vout
->
p_sys
->
p_win
->
i_x
=
0
;
p_vout
->
p_sys
->
p_win
->
i_y
=
0
;
#ifdef HAVE_XINERAMA
if
(
XineramaQueryExtension
(
p_vout
->
p_sys
->
p_display
,
&
i_d1
,
&
i_d2
)
&&
XineramaIsActive
(
p_vout
->
p_sys
->
p_display
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment