Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
obs-studio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yunxiang Li
obs-studio
Commits
a31e938c
Commit
a31e938c
authored
11 years ago
by
BtbN
Browse files
Options
Downloads
Patches
Plain Diff
Fix getting the X11 display with the Qt ui
parent
23c3dfc6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
libobs-opengl/gl-x11.c
+1
-6
1 addition, 6 deletions
libobs-opengl/gl-x11.c
obs/CMakeLists.txt
+6
-1
6 additions, 1 deletion
obs/CMakeLists.txt
obs/qt-wrappers.cpp
+5
-0
5 additions, 0 deletions
obs/qt-wrappers.cpp
with
12 additions
and
7 deletions
libobs-opengl/gl-x11.c
+
1
−
6
View file @
a31e938c
...
@@ -59,12 +59,7 @@ extern struct gl_windowinfo *gl_windowinfo_create(struct gs_init_data *info)
...
@@ -59,12 +59,7 @@ extern struct gl_windowinfo *gl_windowinfo_create(struct gs_init_data *info)
{
{
struct
gl_windowinfo
*
wi
=
bzalloc
(
sizeof
(
struct
gl_windowinfo
));
struct
gl_windowinfo
*
wi
=
bzalloc
(
sizeof
(
struct
gl_windowinfo
));
wi
->
id
=
info
->
window
.
id
;
wi
->
id
=
info
->
window
.
id
;
/* wi->display = info->window.display; */
wi
->
display
=
info
->
window
.
display
;
/*
The above no longer works with Qt.
Let's hope it continues to work.
*/
return
wi
;
return
wi
;
}
}
...
...
This diff is collapsed.
Click to expand it.
obs/CMakeLists.txt
+
6
−
1
View file @
a31e938c
...
@@ -31,6 +31,8 @@ elseif(APPLE)
...
@@ -31,6 +31,8 @@ elseif(APPLE)
add_definitions
(
-fobjc-arc
)
add_definitions
(
-fobjc-arc
)
elseif
(
UNIX
)
elseif
(
UNIX
)
find_package
(
Qt5X11Extras REQUIRED
)
set
(
obs_PLATFORM_SOURCES
set
(
obs_PLATFORM_SOURCES
platform-x11.cpp
)
platform-x11.cpp
)
...
@@ -44,6 +46,9 @@ elseif(UNIX)
...
@@ -44,6 +46,9 @@ elseif(UNIX)
set
(
obs_PLATFORM_LIBRARIES
set
(
obs_PLATFORM_LIBRARIES
${
X11_LIBRARIES
}
${
X11_LIBRARIES
}
${
X11_Xinerama_LIB
}
)
${
X11_Xinerama_LIB
}
)
set
(
obs_PLATFORM_QT_MODULES
X11Extras
)
endif
()
endif
()
set
(
obs_SOURCES
set
(
obs_SOURCES
...
@@ -87,7 +92,7 @@ add_executable(obs WIN32
...
@@ -87,7 +92,7 @@ add_executable(obs WIN32
${
obs_UI_HEADERS
}
${
obs_UI_HEADERS
}
${
obs_QRC_SOURCES
}
)
${
obs_QRC_SOURCES
}
)
qt5_use_modules
(
obs Widgets
)
qt5_use_modules
(
obs Widgets
${
obs_PLATFORM_QT_MODULES
}
)
if
(
WIN32
)
if
(
WIN32
)
if
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
if
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
...
...
This diff is collapsed.
Click to expand it.
obs/qt-wrappers.cpp
+
5
−
0
View file @
a31e938c
...
@@ -20,6 +20,10 @@
...
@@ -20,6 +20,10 @@
#include
<QWidget>
#include
<QWidget>
#include
<QMessageBox>
#include
<QMessageBox>
#if !defined(_WIN32) && !defined(__APPLE__)
#include
<QX11Info>
#endif
static
inline
void
OBSErrorBoxva
(
QWidget
*
parent
,
const
char
*
msg
,
va_list
args
)
static
inline
void
OBSErrorBoxva
(
QWidget
*
parent
,
const
char
*
msg
,
va_list
args
)
{
{
char
full_message
[
4096
];
char
full_message
[
4096
];
...
@@ -44,5 +48,6 @@ void QTToGSWindow(WId windowId, gs_window &gswindow)
...
@@ -44,5 +48,6 @@ void QTToGSWindow(WId windowId, gs_window &gswindow)
gswindow
.
view
=
(
id
)
windowId
;
gswindow
.
view
=
(
id
)
windowId
;
#else
#else
gswindow
.
id
=
windowId
;
gswindow
.
id
=
windowId
;
gswindow
.
display
=
QX11Info
::
display
();
#endif
#endif
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment