Skip to content

UI: Remove x11info dependency#4352

Merged
jp9000 merged 1 commit into
obsproject:masterfrom
kkartaltepe:remove-x11info
Mar 17, 2021
Merged

UI: Remove x11info dependency#4352
jp9000 merged 1 commit into
obsproject:masterfrom
kkartaltepe:remove-x11info

Conversation

@kkartaltepe

Copy link
Copy Markdown
Collaborator

Description

This moves X11 platform to the qt private functions, as x11info was
removed from Qt6 so this is required for a clean Qt5/6 transition.

This is the implementation of x11info::getdisplay so it should still
work on older platforms. This "API" doesnt really guarantee anything
though.

Also clean up wayland only bits as we use them for all windowing systems
now, and the name of the native pointer we want is the same on both
platforms for now.

Motivation and Context

x11info was removed from Qt6 so this is required for a clean Qt5/6 transition.

How Has This Been Tested?

X11 still runs with this change on Qt 5.15.2.

Types of changes

  • Code cleanup (non-breaking change which makes code smaller or more readable)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM WizardCM added kind/cleanup Non-breaking change which makes code smaller or more readable platform/linux Categorizes issue or PR as affecting Linux specifically labels Mar 16, 2021
@GeorgesStavracas

Copy link
Copy Markdown
Member

Haven't tested, but the code looks good. Nice cleanup.

@RytoEX

RytoEX commented Mar 16, 2021

Copy link
Copy Markdown
Member

To clarify, The Qt Company has said that Qt X11 Extras may be_ re-added to Qt6 at some point, but they haven't made any commitments about it or mentioned a specific release milestone. So if we can avoid relying on it, that's probably for the better. Would be even better if we could avoid using private functions, but at least that will work across Qt5 and Qt6 for now.

Looks good to me at a glance, aside from merge conflicts. Could always use additional testing on Linux.

This moves X11 platform to the qt private functions, as x11info was
removed from Qt6 so this is required for a clean Qt5/6 transition.

This is the implementation of x11info::getdisplay so it should still
work on older platforms. This "API" doesnt really guarantee anything
though.

Also clean up wayland only bits as we use them for all windowing systems
now, and the name of the native pointer we want is the same on both
platforms for now.
@kkartaltepe

Copy link
Copy Markdown
Collaborator Author

Updated to fix the merge conflict.

@jp9000

jp9000 commented Mar 17, 2021

Copy link
Copy Markdown
Member

@GeorgesStavracas let me know if you test this patch.

Comment thread UI/CMakeLists.txt
@GeorgesStavracas

Copy link
Copy Markdown
Member

Tested on Ubuntu 20.04 and Arch, it built and ran just fine:

Captura de tela de 2021-03-16 22-34-51

@jp9000
jp9000 merged commit 346e268 into obsproject:master Mar 17, 2021
@RytoEX RytoEX added this to the OBS Studio 27.0 milestone Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Non-breaking change which makes code smaller or more readable platform/linux Categorizes issue or PR as affecting Linux specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants