Skip to content

Commit

Permalink
MythDisplay: Add MythDisplayMutter subclass (for Wayland)
Browse files Browse the repository at this point in the history
- N.B. this is disabled until testing is complete
- MythDisplayMutter uses the org.gnome.Mutter.DisplayConfig DBUS
interface to query and change the screen settings
- it provides display resolution and rate switching when running Wayland
- as far as I can see, this is the only way to handle this with pure
(i.e. no X11) Wayland compositors. Under the hood Wayland will be using
DRM for modeswitching etc - and we will never have the correct
permissions to access this directly.
  • Loading branch information
mark-kendall committed Aug 28, 2020
1 parent 3d3ddd5 commit 1a16b01
Show file tree
Hide file tree
Showing 4 changed files with 703 additions and 6 deletions.
2 changes: 2 additions & 0 deletions mythtv/libs/libmythui/libmythui.pro
Expand Up @@ -133,6 +133,8 @@ using_qtdbus {
DEFINES += USING_DBUS
HEADERS += screensaver-dbus.h
SOURCES += screensaver-dbus.cpp
HEADERS += platforms/mythdisplaymutter.h
SOURCES += platforms/mythdisplaymutter.cpp
}

macx {
Expand Down
21 changes: 15 additions & 6 deletions mythtv/libs/libmythui/mythdisplay.cpp
Expand Up @@ -14,23 +14,26 @@
#include "mythegl.h"
#include "mythmainwindow.h"

#ifdef USING_DBUS
#include "platforms/mythdisplaymutter.h"
#endif
#ifdef Q_OS_ANDROID
#include "mythdisplayandroid.h"
#include "platforms/mythdisplayandroid.h"
#endif
#if defined(Q_OS_MAC)
#include "mythdisplayosx.h"
#include "platforms/mythdisplayosx.h"
#endif
#ifdef USING_X11
#include "mythdisplayx11.h"
#include "platforms/mythdisplayx11.h"
#endif
#ifdef USING_DRM
#include "mythdisplaydrm.h"
#include "platforms/mythdisplaydrm.h"
#endif
#if defined(Q_OS_WIN)
#include "mythdisplaywindows.h"
#include "platforms/mythdisplaywindows.h"
#endif
#ifdef USING_MMAL
#include "mythdisplayrpi.h"
#include "platforms/mythdisplayrpi.h"
#endif

#define LOC QString("Display: ")
Expand Down Expand Up @@ -86,6 +89,12 @@ MythDisplay* MythDisplay::AcquireRelease(bool Acquire)
if (MythDisplayX11::IsAvailable())
s_display = new MythDisplayX11();
#endif
#ifdef USING_DBUS
/* disabled until testing can be completed (add docs on subclass choice when done)
if (!s_display)
s_display = MythDisplayMutter::Create();
*/
#endif
#ifdef USING_MMAL
if (!s_display)
s_display = new MythDisplayRPI();
Expand Down

0 comments on commit 1a16b01

Please sign in to comment.