mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
d0dffc098f
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
154 lines
6.3 KiB
Diff
154 lines
6.3 KiB
Diff
Patch for OpenBoard v. 1.6.0a3 by Roberto Puzzanghera roberto.puzzanghera at sagredo.eu
|
|
based on this patch http://webdiis.unizar.es/~spd/openboard/index.html.en
|
|
|
|
OpenBoard runs in fullscreen mode. This seems to prevent the possibility to be recognized
|
|
by Google meet as an application to share. This patch gets OpenBoard to optionally run in
|
|
a window and solves the issue.
|
|
|
|
With this patch OB runs in fullscreen mode by default. To run it in a window simply
|
|
adjust this option to true in the config file:
|
|
|
|
RunInWindow=true
|
|
|
|
On linux the location of the config file is /opt/openboard/etc/OpenBoard.config. A user
|
|
can override this file acting in local config file ~/.local/share/OpenBoard/OpenBoardUser.config
|
|
|
|
=============================================================================================
|
|
|
|
diff -ruN OpenBoard-1.6.0a3-original/OpenBoard.pro OpenBoard-1.6.0a3/OpenBoard.pro
|
|
--- OpenBoard-1.6.0a3-original/OpenBoard.pro 2020-05-22 18:40:49.000000000 +0200
|
|
+++ OpenBoard-1.6.0a3/OpenBoard.pro 2020-10-24 10:58:50.421254271 +0200
|
|
@@ -442,6 +442,10 @@
|
|
QMAKE_CFLAGS += -fopenmp
|
|
QMAKE_CXXFLAGS += -fopenmp
|
|
QMAKE_LFLAGS += -fopenmp
|
|
+# RunInWindow patch
|
|
+ # Necessary for CentOS/RHEL and won't harm in other distributions
|
|
+ INCLUDEPATH += /usr/include/ffmpeg
|
|
+# end patch
|
|
UB_LIBRARY.path = $$DESTDIR
|
|
UB_I18N.path = $$DESTDIR/i18n
|
|
UB_ETC.path = $$DESTDIR
|
|
diff -ruN OpenBoard-1.6.0a3-original/resources/etc/OpenBoard.config OpenBoard-1.6.0a3/resources/etc/OpenBoard.config
|
|
--- OpenBoard-1.6.0a3-original/resources/etc/OpenBoard.config 2020-05-22 18:40:49.000000000 +0200
|
|
+++ OpenBoard-1.6.0a3/resources/etc/OpenBoard.config 2020-10-24 10:59:50.005263852 +0200
|
|
@@ -14,6 +14,7 @@
|
|
PageCacheSize=20
|
|
PreferredLanguage=fr_CH
|
|
ProductWebAddress=http://www.openboard.ch
|
|
+RunInWindow=false
|
|
SoftwareUpdateURL=http://www.openboard.ch/update.json
|
|
StartMode=
|
|
SwapControlAndDisplayScreens=false
|
|
diff -ruN OpenBoard-1.6.0a3-original/src/core/UBApplication.cpp OpenBoard-1.6.0a3/src/core/UBApplication.cpp
|
|
--- OpenBoard-1.6.0a3-original/src/core/UBApplication.cpp 2020-05-22 18:40:49.000000000 +0200
|
|
+++ OpenBoard-1.6.0a3/src/core/UBApplication.cpp 2020-10-24 11:03:09.881941449 +0200
|
|
@@ -277,8 +277,21 @@
|
|
gs->setAttribute(QWebSettings::JavascriptCanAccessClipboard, true);
|
|
gs->setAttribute(QWebSettings::DnsPrefetchEnabled, true);
|
|
|
|
+ /* RunInWindow patch */
|
|
+ if (UBSettings::settings()->appRunInWindow->get().toBool()) {
|
|
+ mainWindow = new UBMainWindow(0,
|
|
+ Qt::Window |
|
|
+ Qt::WindowCloseButtonHint |
|
|
+ Qt::WindowMinimizeButtonHint |
|
|
+ Qt::WindowMaximizeButtonHint |
|
|
+ Qt::WindowShadeButtonHint
|
|
+ ); // deleted by application destructor
|
|
+ } else {
|
|
+ mainWindow = new UBMainWindow(0, Qt::FramelessWindowHint); // deleted by application destructor
|
|
+ }
|
|
+ /* mainWindow = new UBMainWindow(0, Qt::FramelessWindowHint); // deleted by application destructor */
|
|
+ /* end patch */
|
|
|
|
- mainWindow = new UBMainWindow(0, Qt::FramelessWindowHint); // deleted by application destructor
|
|
mainWindow->setAttribute(Qt::WA_NativeWindow, true);
|
|
|
|
mainWindow->actionCopy->setShortcuts(QKeySequence::Copy);
|
|
diff -ruN OpenBoard-1.6.0a3-original/src/core/UBSettings.cpp OpenBoard-1.6.0a3/src/core/UBSettings.cpp
|
|
--- OpenBoard-1.6.0a3-original/src/core/UBSettings.cpp 2020-05-22 18:40:49.000000000 +0200
|
|
+++ OpenBoard-1.6.0a3/src/core/UBSettings.cpp 2020-10-24 11:02:43.074387051 +0200
|
|
@@ -265,6 +265,9 @@
|
|
appLookForOpenSankoreInstall = new UBSetting(this, "App", "LookForOpenSankoreInstall", true);
|
|
|
|
appStartMode = new UBSetting(this, "App", "StartMode", "");
|
|
+ /* RunInWindow patch */
|
|
+ appRunInWindow = new UBSetting(this, "App", "RunInWindow", false);
|
|
+ /* end patch */
|
|
|
|
featureSliderPosition = new UBSetting(this, "Board", "FeatureSliderPosition", 40);
|
|
|
|
diff -ruN OpenBoard-1.6.0a3-original/src/core/UBSettings.h OpenBoard-1.6.0a3/src/core/UBSettings.h
|
|
--- OpenBoard-1.6.0a3-original/src/core/UBSettings.h 2020-05-22 18:40:49.000000000 +0200
|
|
+++ OpenBoard-1.6.0a3/src/core/UBSettings.h 2020-10-24 11:06:13.206894166 +0200
|
|
@@ -260,7 +260,9 @@
|
|
UBSetting* appHideSwapDisplayScreens;
|
|
UBSetting* appToolBarOrientationVertical;
|
|
UBSetting* appPreferredLanguage;
|
|
-
|
|
+ /* RunInWindow patch */
|
|
+ UBSetting* appRunInWindow;
|
|
+ /* end patch */
|
|
UBSetting* appIsInSoftwareUpdateProcess;
|
|
|
|
UBSetting* appLastSessionDocumentUUID;
|
|
diff -ruN OpenBoard-1.6.0a3-original/src/frameworks/UBPlatformUtils_linux.cpp OpenBoard-1.6.0a3/src/frameworks/UBPlatformUtils_linux.cpp
|
|
--- OpenBoard-1.6.0a3-original/src/frameworks/UBPlatformUtils_linux.cpp 2020-05-22 18:40:49.000000000 +0200
|
|
+++ OpenBoard-1.6.0a3/src/frameworks/UBPlatformUtils_linux.cpp 2020-10-24 11:00:43.708371185 +0200
|
|
@@ -36,7 +36,9 @@
|
|
#include <X11/keysym.h>
|
|
|
|
#include "frameworks/UBFileSystemUtils.h"
|
|
-
|
|
+/* RunInWindow patch */
|
|
+#include "core/UBSettings.h"
|
|
+/* end patch */
|
|
|
|
void UBPlatformUtils::init()
|
|
{
|
|
@@ -439,7 +441,14 @@
|
|
|
|
void UBPlatformUtils::showFullScreen(QWidget *pWidget)
|
|
{
|
|
- pWidget->showFullScreen();
|
|
+ /* RunInWindow patch */
|
|
+ /* pWidget->showFullScreen(); */
|
|
+ if (UBSettings::settings()->appRunInWindow->get().toBool()) {
|
|
+ pWidget->showNormal();
|
|
+ } else {
|
|
+ pWidget->showFullScreen();
|
|
+ }
|
|
+ /* end patch */
|
|
}
|
|
|
|
void UBPlatformUtils::showOSK(bool show)
|
|
diff -ruN OpenBoard-1.6.0a3-original/src/frameworks/UBPlatformUtils_win.cpp OpenBoard-1.6.0a3/src/frameworks/UBPlatformUtils_win.cpp
|
|
--- OpenBoard-1.6.0a3-original/src/frameworks/UBPlatformUtils_win.cpp 2020-05-22 18:40:49.000000000 +0200
|
|
+++ OpenBoard-1.6.0a3/src/frameworks/UBPlatformUtils_win.cpp 2020-10-24 11:01:26.170665369 +0200
|
|
@@ -36,6 +36,9 @@
|
|
|
|
#include "frameworks/UBFileSystemUtils.h"
|
|
#include "core/memcheck.h"
|
|
+/* RunInWindow patch */
|
|
+#include "core/UBSettings.h"
|
|
+/* end patch */
|
|
|
|
void UBPlatformUtils::init()
|
|
{
|
|
@@ -436,7 +439,14 @@
|
|
|
|
void UBPlatformUtils::showFullScreen(QWidget *pWidget)
|
|
{
|
|
- pWidget->showFullScreen();
|
|
+ /* RunInWindow patch */
|
|
+ /* pWidget->showFullScreen(); */
|
|
+ if (UBSettings::settings()->appRunInWindow->get().toBool()) {
|
|
+ pWidget->showNormal();
|
|
+ } else {
|
|
+ pWidget->showFullScreen();
|
|
+ }
|
|
+ /* end patch */
|
|
}
|
|
|
|
void UBPlatformUtils::showOSK(bool show)
|