From ca1234e18f6317fa9d8321c6257204b9e265d860 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 25 Aug 2017 16:10:42 -0400 Subject: Another round of work on getting the window embed stuff cleaned up. Now the windows are restacking properly again - just need to forward events from the frame to the window on-demand still --- src-qt5/core/libLumina/NativeEmbedWidget.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src-qt5/core/libLumina/NativeEmbedWidget.h') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h index 65e03c51..523ff790 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ b/src-qt5/core/libLumina/NativeEmbedWidget.h @@ -43,7 +43,7 @@ public: bool detachWindow(); bool isEmbedded(); //status of the embed - + void raiseWindow(); public slots: //Pause/resume @@ -52,12 +52,14 @@ public slots: void resyncWindow(); void repaintWindow(); + void reregisterEvents(); protected: void resizeEvent(QResizeEvent *ev); void showEvent(QShowEvent *ev); void hideEvent(QHideEvent *ev); void paintEvent(QPaintEvent *ev); + bool nativeEvent(const QByteArray &eventType, void *message, long *result); }; #endif -- cgit From 39c9a096ef2bee1e224561ed5daa6a63a9018b36 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Sun, 27 Aug 2017 11:29:43 -0400 Subject: A bunch more work on Lumina 2 mouse focus settings and such. --- src-qt5/core/libLumina/NativeEmbedWidget.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src-qt5/core/libLumina/NativeEmbedWidget.h') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h index 523ff790..7e129fa3 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ b/src-qt5/core/libLumina/NativeEmbedWidget.h @@ -43,9 +43,9 @@ public: bool detachWindow(); bool isEmbedded(); //status of the embed +public slots: void raiseWindow(); -public slots: //Pause/resume void pause(); void resume(); @@ -59,6 +59,8 @@ protected: void showEvent(QShowEvent *ev); void hideEvent(QHideEvent *ev); void paintEvent(QPaintEvent *ev); + void enterEvent(QEvent *ev); + void leaveEvent(QEvent *ev); bool nativeEvent(const QByteArray &eventType, void *message, long *result); }; -- cgit From eff681c9e56f6044852779b61fbe701e623f2f3a Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 30 Aug 2017 07:04:44 -0400 Subject: Finish up all the mouse focus handling for embedded windows. Works beautifully now. --- src-qt5/core/libLumina/NativeEmbedWidget.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src-qt5/core/libLumina/NativeEmbedWidget.h') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h index 7e129fa3..532db9b9 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ b/src-qt5/core/libLumina/NativeEmbedWidget.h @@ -18,6 +18,7 @@ #include #include #include +#include class NativeEmbedWidget : public QWidget{ Q_OBJECT @@ -45,6 +46,7 @@ public: public slots: void raiseWindow(); + void lowerWindow(); //Pause/resume void pause(); @@ -61,7 +63,10 @@ protected: void paintEvent(QPaintEvent *ev); void enterEvent(QEvent *ev); void leaveEvent(QEvent *ev); - bool nativeEvent(const QByteArray &eventType, void *message, long *result); + void mouseMoveEvent(QMouseEvent *ev); + void mousePressEvent(QMouseEvent *ev); + void mouseReleaseEvent(QMouseEvent *ev); + //bool nativeEvent(const QByteArray &eventType, void *message, long *result); }; #endif -- cgit From 338aa1cab0b748192edb529963b2f88d0e8e2e33 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 30 Aug 2017 12:29:59 -0400 Subject: A bit more work on compositing and such (mostly commented out) - still not working with GPU-backed xorg drivers --- src-qt5/core/libLumina/NativeEmbedWidget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src-qt5/core/libLumina/NativeEmbedWidget.h') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h index 532db9b9..89d95a6f 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ b/src-qt5/core/libLumina/NativeEmbedWidget.h @@ -26,7 +26,7 @@ private: NativeWindow *WIN; QSize winSize; QImage winImage; - bool paused; + bool paused, hasAlphaChannel; private slots: //Simplification functions -- cgit From 0bce08ce5c6fa073b0c9e299ab619d35ecdceef6 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 31 Aug 2017 08:47:21 -0400 Subject: A but more work on Lumina2: 1. Get the menu-based task manager up and running. 2. Get the minimize button setup with normal functionality now (since we can restore it) 3. Get the maximize button logic setup - still testing this 4. Get the window movement animation system setup - still testing this for the maximize functionality 5. Cleanup a bit more of the backend "pause" for windows during animations. --- src-qt5/core/libLumina/NativeEmbedWidget.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src-qt5/core/libLumina/NativeEmbedWidget.h') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h index 89d95a6f..5025f692 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ b/src-qt5/core/libLumina/NativeEmbedWidget.h @@ -43,6 +43,7 @@ public: bool embedWindow(NativeWindow *window); bool detachWindow(); bool isEmbedded(); //status of the embed + bool isPaused(){ return paused; } public slots: void raiseWindow(); -- cgit From 2ed1ee7459868dca7228d61202a38c7c9c3e23f8 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 31 Aug 2017 11:42:33 -0400 Subject: Get all the single-window interactions finished up. Now the multiple types of animations will not conflict/overwrite each other, and the window itself will be properly "paused" for animations. Also fix up some window resize calculation errors, so the offset to the mouse position is properly handled now --- src-qt5/core/libLumina/NativeEmbedWidget.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src-qt5/core/libLumina/NativeEmbedWidget.h') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h index 5025f692..16bb46dc 100644 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ b/src-qt5/core/libLumina/NativeEmbedWidget.h @@ -36,6 +36,7 @@ private slots: void showWindow(); QImage windowImage(QRect geom); + void setWinUnpaused(); public: NativeEmbedWidget(QWidget *parent); -- cgit From d04f35ab9b827085d1cbee0bc2f7cae7787557ef Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 13 Oct 2017 16:25:18 -0400 Subject: Another checkpoint commit for Lumina 2 Almost have the QML-based desktop canvas working - still tracking down some QML syntax issues. --- src-qt5/core/libLumina/NativeEmbedWidget.h | 74 ------------------------------ 1 file changed, 74 deletions(-) delete mode 100644 src-qt5/core/libLumina/NativeEmbedWidget.h (limited to 'src-qt5/core/libLumina/NativeEmbedWidget.h') diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.h b/src-qt5/core/libLumina/NativeEmbedWidget.h deleted file mode 100644 index 16bb46dc..00000000 --- a/src-qt5/core/libLumina/NativeEmbedWidget.h +++ /dev/null @@ -1,74 +0,0 @@ -//=========================================== -// Lumina-DE source code -// Copyright (c) 2017, Ken Moore -// Available under the 3-clause BSD license -// See the LICENSE file for full details -//=========================================== -// This is a container object for embedding a native window into a QWidget -// and maintaining a 1-to-1 mapping of sizing and other properties -// while also providing compositing effects between the two windows -//=========================================== -#ifndef _LUMINA_NATIVE_EMBED_WIDGET_H -#define _LUMINA_NATIVE_EMBED_WIDGET_H - -#include "NativeWindow.h" -#include -#include -#include -#include -#include -#include -#include - -class NativeEmbedWidget : public QWidget{ - Q_OBJECT -private: - NativeWindow *WIN; - QSize winSize; - QImage winImage; - bool paused, hasAlphaChannel; - -private slots: - //Simplification functions - void syncWinSize(QSize sz = QSize()); - void syncWidgetSize(QSize sz); - void hideWindow(); - void showWindow(); - QImage windowImage(QRect geom); - - void setWinUnpaused(); - -public: - NativeEmbedWidget(QWidget *parent); - - bool embedWindow(NativeWindow *window); - bool detachWindow(); - bool isEmbedded(); //status of the embed - bool isPaused(){ return paused; } - -public slots: - void raiseWindow(); - void lowerWindow(); - - //Pause/resume - void pause(); - void resume(); - - void resyncWindow(); - void repaintWindow(); - void reregisterEvents(); - -protected: - void resizeEvent(QResizeEvent *ev); - void showEvent(QShowEvent *ev); - void hideEvent(QHideEvent *ev); - void paintEvent(QPaintEvent *ev); - void enterEvent(QEvent *ev); - void leaveEvent(QEvent *ev); - void mouseMoveEvent(QMouseEvent *ev); - void mousePressEvent(QMouseEvent *ev); - void mouseReleaseEvent(QMouseEvent *ev); - //bool nativeEvent(const QByteArray &eventType, void *message, long *result); -}; - -#endif -- cgit