summaryrefslogtreecommitdiffstats
path: root/ksnapshot
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-03-24 12:33:43 +0900
committerMichele Calgaro <[email protected]>2023-03-24 12:33:43 +0900
commit69768c94ed8cacedd6b83bce3125ab72394497cc (patch)
tree333cc90004aeb3063dccf179ccbd3ff2f2d02887 /ksnapshot
parent5eeaa69b2580f63364ca9f03fae12ca75c493b47 (diff)
downloadtdegraphics-69768c94ed8cacedd6b83bce3125ab72394497cc.tar.gz
tdegraphics-69768c94ed8cacedd6b83bce3125ab72394497cc.zip
KSnapshot: remember window position before/after a snapshot is taken. This resolves issue #55
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'ksnapshot')
-rw-r--r--ksnapshot/ksnapshot.cpp6
-rw-r--r--ksnapshot/ksnapshot.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/ksnapshot/ksnapshot.cpp b/ksnapshot/ksnapshot.cpp
index 7313f103..d1343d9f 100644
--- a/ksnapshot/ksnapshot.cpp
+++ b/ksnapshot/ksnapshot.cpp
@@ -162,6 +162,8 @@ KSnapshot::KSnapshot(TQWidget *parent, const char *name, bool grabCurrent)
connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( reject() ) );
mainWidget->btnNew->setFocus();
+
+ oldWinPos = pos();
}
KSnapshot::~KSnapshot()
@@ -277,6 +279,7 @@ void KSnapshot::slotDragSnapshot()
void KSnapshot::slotGrab()
{
+ oldWinPos = pos();
hide();
if ( mainWidget->delay() && mainWidget->mode() != Region )
@@ -365,6 +368,7 @@ void KSnapshot::slotRegionGrabbed( const TQPixmap &pix )
delete rgnGrab;
TQApplication::restoreOverrideCursor();
+ move(oldWinPos);
show();
}
@@ -379,6 +383,7 @@ void KSnapshot::slotWindowGrabbed( const TQPixmap &pix )
}
TQApplication::restoreOverrideCursor();
+ move(oldWinPos);
show();
}
@@ -560,6 +565,7 @@ void KSnapshot::performGrab()
TQApplication::restoreOverrideCursor();
modified = true;
updateCaption();
+ move(oldWinPos);
show();
}
diff --git a/ksnapshot/ksnapshot.h b/ksnapshot/ksnapshot.h
index 55c0917b..fb8084bd 100644
--- a/ksnapshot/ksnapshot.h
+++ b/ksnapshot/ksnapshot.h
@@ -153,6 +153,7 @@ private:
bool modified;
TDETrader::OfferList openWithOffers;
TQMap<TDEProcess*, KTempFile*> m_tmpFiles;
+ TQPoint oldWinPos;
};
#endif // KSNAPSHOT_H