mouse pointer (4)

Carles Pina i Estany <[email protected]>
Newsgroups gmane.comp.kde.gwenview
Message-ID <[email protected]>
Hi,

There was a typo in last patch, i resend _whole_ patch :-)
Typo's problem is that, changing image before last one was completly
loaded, mouse pointer was not restoring to "usual" one.

-- 
Carles Pina i Estany		GPG id: 0x8CBDAE64
	http://pinux.info	Manresa - Barcelona

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

_______________________________________________
Gwenview-general mailing list
Gwenview-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/gwenview-general
hide_pointer4.patch (text/x-diff, 2 KB)
Index: app/mainwindow.cpp
===================================================================
--- app/mainwindow.cpp	(revision 699377)
+++ app/mainwindow.cpp	(working copy)
@@ -524,7 +524,10 @@
 
 
 void MainWindow::slotImageLoaded() {
-	kapp->restoreOverrideCursor();
+	// Reciproc of slotImageLoading
+	if (FullScreenConfig::showBusyPtr() || !mToggleFullScreen->isChecked()) {
+		kapp->restoreOverrideCursor();
+	}
 	updateStatusInfo();
 	updateImageActions();
 	updateLocationURL();
Index: gvcore/imageviewcontroller.cpp
===================================================================
--- gvcore/imageviewcontroller.cpp	(revision 699377)
+++ gvcore/imageviewcontroller.cpp	(working copy)
@@ -98,7 +98,9 @@
 	ImageView* mImageView;
 	KActionPtrList mImageViewActions;
 	
+	// Hide cursor stuff
 	QTimer* mAutoHideTimer;
+	bool mCursorHidden;
 	
 	KParts::ReadOnlyPart* mPlayerPart;
 	
@@ -269,6 +271,7 @@
 	d->mDocument=document;
 	d->mActionCollection=actionCollection;
 	d->mAutoHideTimer=new QTimer(this);
+	d->mCursorHidden=false;
 
 	d->mContainer=new QWidget(parent);
 	d->mContainer->setMinimumWidth(1); // Make sure we can resize the toolbar smaller than its minimum size
@@ -349,6 +352,7 @@
 	} else {
 		d->mAutoHideTimer->stop();
 		QApplication::restoreOverrideCursor();
+		d->mCursorHidden=false;
 	}
 
 	d->mToolBar->setHidden(d->mFullScreen);
@@ -394,6 +398,7 @@
 	QWidget* widget = KApplication::kApplication()->activeWindow();
 	if (!widget || !widget->inherits("QDialog")) {
 		QApplication::setOverrideCursor(blankCursor);
+		d->mCursorHidden=true;
 	}
 }
 
@@ -429,8 +434,20 @@
 	if (!isAChildOfStack) return false;
 
 	d->updateFullScreenBarPosition();
-	QApplication::restoreOverrideCursor();
-	d->restartAutoHideTimer();
+
+	if (event->type()==QEvent::MouseMove) {
+		d->mCursorHidden=false;
+		d->restartAutoHideTimer();
+
+	}	
+	if (d->mCursorHidden==true) {
+		QApplication::setOverrideCursor(blankCursor,true);
+	}
+	else {
+		QApplication::restoreOverrideCursor();
+		d->mCursorHidden=false;
+	}
+
 	return false;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.