[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Sun Apr 11 02:57:31 CEST 2004
CVS commit by staikos:
fix nasty bug on PPC and possibly some other architectures
M +1 -1 ksttoplevelview.h 1.14
M +17 -24 kstviewwidget.cpp 1.13
--- kdeextragear-2/kst/kst/ksttoplevelview.h #1.13:1.14
@@ -74,5 +74,5 @@ class KstTopLevelView : public KstViewOb
bool _focusOn : 1;
ViewMode _mode : 4;
- char _pressDirection;
+ signed int _pressDirection : 5;
QCursor _cursor;
QPoint _moveOffset;
--- kdeextragear-2/kst/kst/kstviewwidget.cpp #1.12:1.13
@@ -26,4 +26,5 @@ KstViewWidget::KstViewWidget(KstTopLevel
setDragEnabled(true);
setDropEnabled(true);
+ setMouseTracking(true);
}
@@ -43,5 +44,4 @@ void KstViewWidget::enterEvent(QEvent *e
//kdDebug() << "Turning on tracking again" << endl;
_view->clearFocus();
- setMouseTracking(true);
}
QWidget::enterEvent(e);
@@ -57,5 +57,4 @@ void KstViewWidget::leaveEvent(QEvent *e
if (!_view->tracking()) {
//kdDebug() << "Not tracking" << endl;
- setMouseTracking(false);
_view->clearFocus();
} else {
@@ -69,15 +68,11 @@ void KstViewWidget::leaveEvent(QEvent *e
void KstViewWidget::mouseMoveEvent(QMouseEvent *e) {
- if (hasMouseTracking()) {
if (e->state() == 0) {
- //kdDebug() << "mouse tracking with no button" << endl;
_view->updateFocus(e->pos());
e->accept();
} else if (e->state() & Qt::LeftButton) {
- //kdDebug() << "Tracking press move event" << endl;
_view->pressMove(e->pos());
e->accept();
}
- }
}
@@ -85,5 +80,4 @@ void KstViewWidget::mouseMoveEvent(QMous
void KstViewWidget::mousePressEvent(QMouseEvent *e) {
//kdDebug() << "Press event. button=" << e->button() << " state=" << e->state() << endl;
- if (hasMouseTracking()) {
if (e->button() == Qt::LeftButton && _view->handlePress(e->pos())) {
//kdDebug() << " -> Accepting" << endl;
@@ -96,5 +90,4 @@ void KstViewWidget::mousePressEvent(QMou
return;
}
- }
//kdDebug() << " -> Passing up" << endl;
QWidget::mousePressEvent(e);
@@ -104,5 +97,5 @@ void KstViewWidget::mousePressEvent(QMou
void KstViewWidget::mouseReleaseEvent(QMouseEvent *e) {
//kdDebug() << "Release event. button=" << e->button() << " state=" << e->state() << endl;
- if (hasMouseTracking() && e->button() & Qt::LeftButton) {
+ if (e->button() & Qt::LeftButton) {
//kdDebug() << "doing releasePress" << endl;
_view->releasePress(e->pos());
More information about the Kst
mailing list