Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
1c201d48
Commit
1c201d48
authored
Aug 13, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: synchronize X display
This should fix spurious BadWindow errors from the video displays.
parent
7475606a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.cpp
+12
-1
No files found.
modules/gui/qt4/components/interface_widgets.cpp
View file @
1c201d48
...
@@ -45,6 +45,15 @@
...
@@ -45,6 +45,15 @@
#ifdef Q_WS_X11
#ifdef Q_WS_X11
# include <X11/Xlib.h>
# include <X11/Xlib.h>
# include <qx11info_x11.h>
# include <qx11info_x11.h>
static
void
videoSync
(
void
)
{
/* Make sure the X server has processed all requests.
* This protects other threads using distinct connections from getting
* the video widget window in an inconsistent states. */
XSync
(
QX11Info
::
display
(),
False
);
}
#else
# define videoSync() (void)0
#endif
#endif
#include <math.h>
#include <math.h>
...
@@ -133,8 +142,8 @@ WId VideoWidget::request( int *pi_x, int *pi_y,
...
@@ -133,8 +142,8 @@ WId VideoWidget::request( int *pi_x, int *pi_y,
reparentable
->
setLayout
(
innerLayout
);
reparentable
->
setLayout
(
innerLayout
);
layout
->
addWidget
(
reparentable
);
layout
->
addWidget
(
reparentable
);
updateGeometry
();
videoSync
();
#ifndef NDEBUG
#ifndef NDEBUG
msg_Dbg
(
p_intf
,
"embedded video ready (handle %p)"
,
msg_Dbg
(
p_intf
,
"embedded video ready (handle %p)"
,
(
void
*
)
stable
->
winId
()
);
(
void
*
)
stable
->
winId
()
);
...
@@ -152,6 +161,7 @@ void VideoWidget::SetSizing( unsigned int w, unsigned int h )
...
@@ -152,6 +161,7 @@ void VideoWidget::SetSizing( unsigned int w, unsigned int h )
videoSize
.
rheight
()
=
h
;
videoSize
.
rheight
()
=
h
;
if
(
!
isVisible
()
)
show
();
if
(
!
isVisible
()
)
show
();
updateGeometry
();
// Needed for deinterlace
updateGeometry
();
// Needed for deinterlace
videoSync
();
}
}
void
VideoWidget
::
SetFullScreen
(
bool
b_fs
)
void
VideoWidget
::
SetFullScreen
(
bool
b_fs
)
...
@@ -186,6 +196,7 @@ void VideoWidget::SetFullScreen( bool b_fs )
...
@@ -186,6 +196,7 @@ void VideoWidget::SetFullScreen( bool b_fs )
layout
->
addWidget
(
reparentable
);
layout
->
addWidget
(
reparentable
);
reparentable
->
setWindowState
(
newstate
);
reparentable
->
setWindowState
(
newstate
);
}
}
videoSync
();
}
}
void
VideoWidget
::
release
(
void
)
void
VideoWidget
::
release
(
void
)
...
...
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