aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/NativeEmbedWidget.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-07-20 12:40:16 -0400
committerKen Moore <ken@ixsystems.com>2017-07-20 12:40:16 -0400
commit23b870f04c46e8fa6d4ca2b14eb6d9ea2285a4c0 (patch)
tree2c8a5443b880b7261838d264e3db386bfc7a5fd3 /src-qt5/core/libLumina/NativeEmbedWidget.cpp
parentGet the compositing working much smoother now. (diff)
downloadlumina-23b870f04c46e8fa6d4ca2b14eb6d9ea2285a4c0.tar.gz
lumina-23b870f04c46e8fa6d4ca2b14eb6d9ea2285a4c0.tar.bz2
lumina-23b870f04c46e8fa6d4ca2b14eb6d9ea2285a4c0.zip
Add a window animation framework, with 7 visibility animations for starters.
Diffstat (limited to 'src-qt5/core/libLumina/NativeEmbedWidget.cpp')
-rw-r--r--src-qt5/core/libLumina/NativeEmbedWidget.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src-qt5/core/libLumina/NativeEmbedWidget.cpp b/src-qt5/core/libLumina/NativeEmbedWidget.cpp
index 34501f2a..e3c19e9f 100644
--- a/src-qt5/core/libLumina/NativeEmbedWidget.cpp
+++ b/src-qt5/core/libLumina/NativeEmbedWidget.cpp
@@ -163,11 +163,11 @@ void NativeEmbedWidget::resyncWindow(){
}
void NativeEmbedWidget::repaintWindow(){
- qDebug() << "Update Window Image";
+ //qDebug() << "Update Window Image";
QImage tmp = windowImage( QRect(QPoint(0,0), this->size()) );
if(!tmp.isNull()){
winImage = tmp;
- }else{ qDebug() << "Got Null Image!!"; }
+ }//else{ qDebug() << "Got Null Image!!"; }
this->update();
}
// ==============
@@ -192,10 +192,11 @@ void NativeEmbedWidget::hideEvent(QHideEvent *ev){
void NativeEmbedWidget::paintEvent(QPaintEvent *ev){
if(this->size()!=winSize){ return; } //do not paint here - waiting to re-sync the sizes
- if(WIN==0){ QWidget::paintEvent(ev); return; }
+ else if(WIN==0){ QWidget::paintEvent(ev); return; }
+ else if(this->size() != winImage.size()){ return; }
//Need to paint the image from the window onto the widget as an overlay
QRect geom = ev->rect(); //atomic updates
- geom.adjust(-1,-1,1,1); //add an additional pixel in each direction to be painted
+ geom.adjust(-10,-10,10,10); //add an additional few pixels in each direction to be painted
geom = geom.intersected(QRect(0,0,this->width(), this->height())); //ensure intersection with actual window
if(!winImage.isNull()){
if( !QRect(QPoint(0,0),winImage.size()).contains(geom) ){ QTimer::singleShot(0,this, SLOT(repaintWindow()) );return; }
bgstack15