aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/DesktopWindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'vncviewer/DesktopWindow.h')
-rw-r--r--vncviewer/DesktopWindow.h42
1 files changed, 25 insertions, 17 deletions
diff --git a/vncviewer/DesktopWindow.h b/vncviewer/DesktopWindow.h
index 69729ff8..ca4cf53a 100644
--- a/vncviewer/DesktopWindow.h
+++ b/vncviewer/DesktopWindow.h
@@ -1,5 +1,5 @@
/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
- * Copyright 2011 Pierre Ossman <ossman@cendio.se> for Cendio AB
+ * Copyright 2011-2025 Pierre Ossman <ossman@cendio.se> for Cendio AB
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,7 +20,9 @@
#ifndef __DESKTOPWINDOW_H__
#define __DESKTOPWINDOW_H__
+#include <list>
#include <map>
+#include <string>
#include <sys/time.h>
@@ -37,8 +39,7 @@ class Fl_Scrollbar;
class DesktopWindow : public Fl_Window {
public:
- DesktopWindow(int w, int h, const char *name,
- const rfb::PixelFormat& serverPF, CConn* cc_);
+ DesktopWindow(int w, int h, CConn* cc_);
~DesktopWindow();
// Most efficient format (from DesktopWindow's point of view)
@@ -48,7 +49,7 @@ public:
void updateWindow();
// Updated session title
- void setName(const char *name);
+ void updateCaption();
// Resize the current framebuffer, but retain the contents
void resizeFramebuffer(int new_w, int new_h);
@@ -57,8 +58,7 @@ public:
void setDesktopSizeDone(unsigned result);
// New image for the locally rendered cursor
- void setCursor(int width, int height, const core::Point& hotspot,
- const uint8_t* data);
+ void setCursor();
// Server-provided cursor position
void setCursorPos(const core::Point& pos);
@@ -80,11 +80,16 @@ public:
void fullscreen_on();
-private:
- static void menuOverlay(void *data);
+ // Grab keyboard events from desktop environment
+ void grabKeyboard();
+ void ungrabKeyboard();
- void setOverlay(const char *text, ...)
+private:
+ void addOverlayTip(const char *text, ...)
+ __attribute__((__format__ (__printf__, 2, 3)));
+ void addOverlayError(const char *text, ...)
__attribute__((__format__ (__printf__, 2, 3)));
+ void addOverlay(const char *text);
static void updateOverlay(void *data);
static int fltkDispatch(int event, Fl_Window *win);
@@ -92,14 +97,9 @@ private:
bool hasFocus();
- void maybeGrabKeyboard();
- void grabKeyboard();
- void ungrabKeyboard();
void grabPointer();
void ungrabPointer();
- static void handleGrab(void *data);
-
void maximizeWindow();
static void handleResizeTimeout(void *data);
@@ -125,9 +125,15 @@ private:
Fl_Scrollbar *hscroll, *vscroll;
Viewport *viewport;
Surface *offscreen;
- Surface *overlay;
- unsigned char overlayAlpha;
- struct timeval overlayStart;
+
+ struct Overlay {
+ Surface *surface;
+ unsigned char alpha;
+ struct timeval start;
+ };
+
+ std::list<Overlay> overlays;
+ std::map<std::string, time_t> overlayTimes;
bool firstUpdate;
bool delayedFullscreen;
@@ -139,6 +145,8 @@ private:
bool keyboardGrabbed;
bool mouseGrabbed;
+ bool regrabOnFocus;
+
struct statsEntry {
unsigned ups;
unsigned pps;