Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
d968cdc2
Commit
d968cdc2
authored
Dec 08, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: provide the X11 display address through the window provider
parent
35850e00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+12
-7
No files found.
modules/gui/qt4/qt4.cpp
View file @
d968cdc2
...
...
@@ -259,6 +259,9 @@ vlc_module_end ()
/* Ugly, but the Qt4 interface assumes single instance anyway */
static
vlc_sem_t
ready
;
#ifdef Q_WS_X11
static
char
*
x11_display
=
NULL
;
#endif
/*****************************************************************************
* Module callbacks
...
...
@@ -270,9 +273,8 @@ static int Open( vlc_object_t *p_this )
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
#ifdef Q_WS_X11
char
*
psz_display
=
var_CreateGetNonEmptyString
(
p_intf
,
"x11-display"
);
Display
*
p_display
=
XOpenDisplay
(
psz_display
);
free
(
psz_display
);
x11_display
=
var_CreateGetNonEmptyString
(
p_intf
,
"x11-display"
);
Display
*
p_display
=
XOpenDisplay
(
x11_display
);
if
(
!
p_display
)
{
msg_Err
(
p_intf
,
"Could not connect to X server"
);
...
...
@@ -338,6 +340,9 @@ static void Close( vlc_object_t *p_this )
vlc_join
(
p_sys
->
thread
,
NULL
);
pl_Release
(
p_this
);
delete
p_sys
;
#ifdef Q_WS_X11
free
(
x11_display
);
#endif
}
static
void
*
Thread
(
void
*
obj
)
...
...
@@ -352,11 +357,10 @@ static void *Thread( void *obj )
/* Start the QApplication here */
#ifdef Q_WS_X11
char
*
display
=
var_CreateGetNonEmptyString
(
p_intf
,
"x11-display"
);
if
(
display
)
if
(
x11_display
!=
NULL
)
{
argv
[
argc
++
]
=
const_cast
<
char
*>
(
"-display"
);
argv
[
argc
++
]
=
display
;
argv
[
argc
++
]
=
x11_
display
;
argv
[
argc
]
=
NULL
;
}
#endif
...
...
@@ -473,7 +477,7 @@ static void *Thread( void *obj )
/* Delete the application automatically */
#ifdef Q_WS_X11
free
(
display
);
free
(
x11_
display
);
#endif
return
NULL
;
}
...
...
@@ -531,6 +535,7 @@ static int WindowOpen( vlc_object_t *p_obj )
p_wnd
->
xid
=
p_mi
->
getVideo
(
&
i_x
,
&
i_y
,
&
i_width
,
&
i_height
);
if
(
!
p_wnd
->
xid
)
return
VLC_EGENERIC
;
p_wnd
->
x11_display
=
x11_display
;
#elif defined (Q_WS_WIN)
p_wnd
->
hwnd
=
p_mi
->
getVideo
(
&
i_x
,
&
i_y
,
&
i_width
,
&
i_height
);
...
...
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