aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop
diff options
context:
space:
mode:
authorZackaryWelch <welch.zackary@gmail.com>2018-04-18 11:37:51 -0400
committerZackaryWelch <welch.zackary@gmail.com>2018-04-18 11:37:51 -0400
commit727a1a17ecf0b534b7d6132326849b9efb760c07 (patch)
treef210f19bad2f19420fbbe175e1b886fdb64b8d9f /src-qt5/core/lumina-desktop
parentMuted unused variable warnings in the Poppler backend (diff)
parentClean up the default fluxbox key bindings: (diff)
downloadlumina-727a1a17ecf0b534b7d6132326849b9efb760c07.tar.gz
lumina-727a1a17ecf0b534b7d6132326849b9efb760c07.tar.bz2
lumina-727a1a17ecf0b534b7d6132326849b9efb760c07.zip
Merge branch 'master' of http://github.com/trueos/lumina
Diffstat (limited to 'src-qt5/core/lumina-desktop')
-rw-r--r--src-qt5/core/lumina-desktop/LDesktopBackground.cpp2
-rw-r--r--src-qt5/core/lumina-desktop/LSession.cpp31
-rw-r--r--src-qt5/core/lumina-desktop/LSession.h7
-rw-r--r--src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-keys25
-rw-r--r--src-qt5/core/lumina-desktop/lumina-desktop.pro4
5 files changed, 46 insertions, 23 deletions
diff --git a/src-qt5/core/lumina-desktop/LDesktopBackground.cpp b/src-qt5/core/lumina-desktop/LDesktopBackground.cpp
index 6b458c24..22ee6dc4 100644
--- a/src-qt5/core/lumina-desktop/LDesktopBackground.cpp
+++ b/src-qt5/core/lumina-desktop/LDesktopBackground.cpp
@@ -46,7 +46,7 @@ QPixmap LDesktopBackground::setBackground(const QString& bgFile, const QString&
} else {
mode = Qt::KeepAspectRatio;
}
- if(bgImage.height() != geom.height() && bgImage.width() != geom.width() ){ bgImage = bgImage.scaled(geom.size(), mode); }
+ if(bgImage.height() != geom.height() && bgImage.width() != geom.width() ){ bgImage = bgImage.scaled(geom.size(), mode, Qt::SmoothTransformation); }
//bgImage = bgImage.scaled(size(), mode);
}
diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp
index c1f49fc3..fe399e40 100644
--- a/src-qt5/core/lumina-desktop/LSession.cpp
+++ b/src-qt5/core/lumina-desktop/LSession.cpp
@@ -10,6 +10,7 @@
#include <QTime>
#include <QScreen>
#include <QtConcurrent>
+#include <QMimeData>
#include "LXcbEventFilter.h"
#include "BootSplash.h"
@@ -72,6 +73,11 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu
connect(this, SIGNAL(screenAdded(QScreen*)), this, SLOT(screensChanged()) );
connect(this, SIGNAL(screenRemoved(QScreen*)), this, SLOT(screensChanged()) );
connect(this, SIGNAL(primaryScreenChanged(QScreen*)), this, SLOT(screensChanged()) );
+
+ // Clipboard
+ ignoreClipboard = false;
+ qRegisterMetaType<QClipboard::Mode>("QClipboard::Mode");
+ connect(QApplication::clipboard(), SIGNAL(changed(QClipboard::Mode)), this, SLOT(handleClipboard(QClipboard::Mode)));
} //end check for primary process
}
@@ -587,6 +593,31 @@ void LSession::SessionEnding(){
stopSystemTray(); //just in case it was not stopped properly earlier
}
+void LSession::handleClipboard(QClipboard::Mode mode){
+ if ( !ignoreClipboard && mode == QClipboard::Clipboard ){ //only support Clipboard
+ const QMimeData *mime = QApplication::clipboard()->mimeData(mode);
+ if (mime==NULL) { return; }
+ if (mime->hasText() && !QApplication::clipboard()->ownsClipboard()) {
+ //preserve the entire mimeData set, not just the text
+ //Note that even when we want to "save" the test, we should keep the whole thing
+ // this preserves formatting codes and more that apps might need
+ QMimeData *copy = new QMimeData();
+ QStringList fmts = mime->formats();
+ for(int i=0; i<fmts.length(); i++){ copy->setData(fmts[i], mime->data(fmts[i])); }
+ ignoreClipboard = true;
+ QApplication::clipboard()->setMimeData(copy, mode);
+ ignoreClipboard = false;
+ //QMetaObject::invokeMethod(this, "storeClipboard", Qt::QueuedConnection, Q_ARG(QString, mime->text()), Q_ARG(QClipboard::Mode, mode));
+ }
+ }
+}
+
+void LSession::storeClipboard(QString text, QClipboard::Mode mode){
+ ignoreClipboard = true;
+ QApplication::clipboard()->setText(text, mode);
+ ignoreClipboard = false;
+}
+
//===============
// SYSTEM ACCESS
//===============
diff --git a/src-qt5/core/lumina-desktop/LSession.h b/src-qt5/core/lumina-desktop/LSession.h
index a25f3c15..824eede7 100644
--- a/src-qt5/core/lumina-desktop/LSession.h
+++ b/src-qt5/core/lumina-desktop/LSession.h
@@ -21,6 +21,7 @@
#include <QMediaPlayer>
#include <QThread>
#include <QUrl>
+#include <QClipboard>
#include "Globals.h"
#include "AppMenu.h"
@@ -141,6 +142,8 @@ private:
int VersionStringToNumber(QString version);
+ bool ignoreClipboard; // flag for (handle/store)Clipboard
+
public slots:
void StartLogout();
void StartShutdown(bool skipupdates = false);
@@ -170,6 +173,10 @@ private slots:
void SessionEnding();
+ // Clipboard
+ void handleClipboard(QClipboard::Mode mode);
+ void storeClipboard(QString text, QClipboard::Mode mode);
+
signals:
//System Tray Signals
void VisualTrayAvailable(); //new Visual Tray Plugin can be registered
diff --git a/src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-keys b/src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-keys
index d3ee64ef..82d31e9c 100644
--- a/src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-keys
+++ b/src-qt5/core/lumina-desktop/fluxboxconf/fluxbox-keys
@@ -49,16 +49,10 @@ OnTitlebar Mouse3 :WindowMenu
# alt-tab
Mod1 Tab :NextWindow (workspace=[current]) (workspace=[current]) !! FBCV13 !!
Mod1 Shift Tab :PrevWindow (workspace=[current]) (workspace=[current]) !! FBCV13 !!
-Control Tab :NextGroup (workspace=[current]) (workspace=[current])
-Control Shift Tab :PrevGroup (workspace=[current]) (workspace=[current])
-
-# cycle through tabs in the current window
-Mod4 Tab :NextTab
-Mod4 Shift Tab :PrevTab
# Arrange/Tile Current windows
-Mod1 Left :ArrangeWindowsStackRight (Layer=Normal)
-Mod1 Right :ArrangeWindowsStackLeft (Layer=Normal)
+Mod1 Control Left :ArrangeWindowsStackRight (Layer=Normal)
+Mod1 Control Right :ArrangeWindowsStackLeft (Layer=Normal)
# go to a specific tab in the current window
Mod4 1 :Tab 1
@@ -84,14 +78,6 @@ Mod1 F9 :If {Matches (Layer=Normal)} {Minimize}
Mod1 F10 :If {Matches (Layer=Normal)} {Maximize}
Mod1 F11 :If {Matches (Layer=Normal)} {Fullscreen}
-# send the current window to previous/next workspace
-Mod4 Left :If {Matches (Layer=Normal)} {SendToPrevWorkspace}
-Mod4 Right :If {Matches (Layer=Normal)} {SendToNextWorkspace}
-
-# send the current window and follow it to previous/next workspace
-Control Mod4 Left :If {Matches (Layer=Normal)} {TakeToPrevWorkspace}
-Control Mod4 Right :If {Matches (Layer=Normal)} {TakeToNextWorkspace}
-
# change to a specific workspace
Control F1 :Workspace 1
Control F2 :Workspace 2
@@ -109,9 +95,9 @@ Control F12 :Workspace 12
Control Mod1 Left :PrevWorkspace
Control Mod1 Right :NextWorkspace
-# Control + MouseWheel to change workspaces
-Control Mouse4 :PrevWorkspace
-Control Mouse5 :NextWorkspace
+# Control+Alt + MouseWheel to change workspaces
+Control Mod1 Mouse4 :PrevWorkspace
+Control Mod1 Mouse5 :NextWorkspace
# send the current window to a specific workspace
Mod4 F1 :SendToWorkspace 1
@@ -152,3 +138,4 @@ Mod1 Home :Exec lumina-open -brightnessup
Mod1 End :Exec lumina-open -brightnessdown
F12 :Exec lumina-terminal -toggle
115 :Exec lumina-desktop --show-start
+Mod4 space :Exec lumina-desktop --show-start
diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro
index e36d11a2..cc4b63ae 100644
--- a/src-qt5/core/lumina-desktop/lumina-desktop.pro
+++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro
@@ -69,9 +69,7 @@ RESOURCES+= Lumina-DE.qrc
desktop.path = $${L_SESSDIR}
desktop.files = Lumina-DE.desktop
-icons.files = Lumina-DE.png \
- Insight-FileManager.png
-icons.path = $${L_SHAREDIR}/pixmaps
+icons.files = Lumina-DE.png
fluxconf.files = fluxboxconf/fluxbox-init-rc \
fluxboxconf/fluxbox-keys
bgstack15