Skip to content

Commit

Permalink
left mouse double-click exits fullscreen / presentation mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kjk committed Sep 13, 2023
1 parent 5816b7d commit 61d7c36
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
License: GPLv3 */

#include "utils/BaseUtil.h"
#include "utils/BitManip.h"
#include "utils/WinDynCalls.h"
#include "utils/Dpi.h"
#include "utils/FileUtil.h"
Expand Down Expand Up @@ -580,10 +581,11 @@ static void OnMouseLeftButtonUp(MainWindow* win, int x, int y, WPARAM key) {

static void OnMouseLeftButtonDblClk(MainWindow* win, int x, int y, WPARAM key) {
// lf("Left button clicked on %d %d", x, y);
if (win->presentation && !(key & ~MK_LBUTTON)) {
// in presentation mode, left clicks turn the page,
// make two quick left clicks (AKA one double-click) turn two pages
OnMouseLeftButtonDown(win, x, y, key);
auto isLeft = bit::IsMaskSet(key, (WPARAM)MK_LBUTTON);
if (isLeft && (win->presentation || win->isFullScreen)) {
// note: before 3.5 used to turn 2 pages
// OnMouseLeftButtonDown(win, x, y, key);
ExitFullScreen(win);
return;
}

Expand Down

0 comments on commit 61d7c36

Please sign in to comment.