Skip to content

Commit a0c0c4b

Browse files
committed
Limit screen edge pushing to fullscreen mode
1 parent 4089c5f commit a0c0c4b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/core/StelMovementMgr.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*/
2525

2626
#include "StelMovementMgr.hpp"
27+
#include "StelMainView.hpp"
2728
#include "StelObjectMgr.hpp"
2829
#include "StelModuleMgr.hpp"
2930
#include "StelApp.hpp"
@@ -316,8 +317,8 @@ Vec3d StelMovementMgr::getViewUpVectorJ2000() const
316317

317318
bool StelMovementMgr::handleMouseMoves(int x, int y, Qt::MouseButtons)
318319
{
319-
// Turn if the mouse is at the edge of the screen unless config asks otherwise
320-
if (flagEnableMoveAtScreenEdge)
320+
// Turn if the mouse is at the edge of the screen unless config asks otherwise (this is too awkward in windowed mode)
321+
if (flagEnableMoveAtScreenEdge && StelMainView::getInstance().isFullScreen())
321322
{
322323
if (x <= 1)
323324
{

src/core/StelMovementMgr.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public slots:
216216
//! PROPERTY GETTER/SETTER
217217
//! Get whether being at the edge of the screen activates movement
218218
bool getFlagEnableMoveAtScreenEdge() const {return flagEnableMoveAtScreenEdge;}
219-
//! Set whether being at the edge of the screen activates movement
219+
//! Set whether being at the edge of the screen activates movement. The actual motion is only performed in fullscreen mode.
220220
void setFlagEnableMoveAtScreenEdge(bool b) {flagEnableMoveAtScreenEdge=b; StelApp::immediateSave("navigation/flag_enable_move_at_screen_edge", b); emit flagEnableMoveAtScreenEdgeChanged(b);}
221221

222222
//! PROPERTY GETTER/SETTER

src/gui/configurationDialog.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2210,7 +2210,7 @@
22102210
<item row="6" column="1">
22112211
<widget class="QCheckBox" name="pushScreenEdgeCheckBox">
22122212
<property name="toolTip">
2213-
<string>Allow mouse to move view when at screen edge</string>
2213+
<string>Allow mouse to move view when at screen edge (Fullscreen only)</string>
22142214
</property>
22152215
<property name="text">
22162216
<string>Mouse push screen edge</string>

0 commit comments

Comments
 (0)