aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2024-12-09 16:19:19 +0100
committerPierre Ossman <ossman@cendio.se>2024-12-09 16:19:19 +0100
commit24a89098ffa13b33bc5bb712530e1e19ee948823 (patch)
treea58e9b058a7ed42159aa20c787b4dd1cbc151320
parentf06e574be1e6aa969084ca3ff4918dbc2ee32f2b (diff)
downloadtigervnc-24a89098ffa13b33bc5bb712530e1e19ee948823.tar.gz
tigervnc-24a89098ffa13b33bc5bb712530e1e19ee948823.zip
Size edge scroll after window, not remote session
This should scale with the rest of the visible interface, not the invisible stuff that might vary wildely. In the most extreme cases, there is no usable area left as everything on screen becomes "edge".
-rw-r--r--vncviewer/DesktopWindow.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx
index 584debd1..6dbd7d5f 100644
--- a/vncviewer/DesktopWindow.cxx
+++ b/vncviewer/DesktopWindow.cxx
@@ -58,8 +58,8 @@
#endif
// width of each "edge" region where scrolling happens,
-// as a ratio compared to the viewport size
-// default: 1/16th of the viewport size
+// as a ratio compared to the window size
+// default: 1/16th of the window size
#define EDGE_SCROLL_SIZE 16
// edge width is calculated at runtime; these values are just examples
static int edge_scroll_size_x = 128;
@@ -863,9 +863,9 @@ int DesktopWindow::handle(int event)
}
if (fullscreen_active()) {
// calculate width of "edge" regions
- edge_scroll_size_x = viewport->w() / EDGE_SCROLL_SIZE;
- edge_scroll_size_y = viewport->h() / EDGE_SCROLL_SIZE;
- // if cursor is near the edge of the viewport, scroll
+ edge_scroll_size_x = w() / EDGE_SCROLL_SIZE;
+ edge_scroll_size_y = h() / EDGE_SCROLL_SIZE;
+ // if cursor is near the edge of the window, scroll
if (((viewport->x() < 0) && (Fl::event_x() < edge_scroll_size_x)) ||
((viewport->x() + viewport->w() >= w()) && (Fl::event_x() >= w() - edge_scroll_size_x)) ||
((viewport->y() < 0) && (Fl::event_y() < edge_scroll_size_y)) ||