aboutsummaryrefslogtreecommitdiffstats
path: root/unix/x0vncserver
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2022-09-10 13:19:41 +0200
committerPierre Ossman <ossman@cendio.se>2023-02-01 21:17:12 +0100
commit6881c895ab317bd302addac5f228b7367136017f (patch)
tree18d1119f59209147d97e873c3dbc9be36e429aaf /unix/x0vncserver
parentbaca73d03217a1c219d9c4f024ffcd39f85fd322 (diff)
downloadtigervnc-6881c895ab317bd302addac5f228b7367136017f.tar.gz
tigervnc-6881c895ab317bd302addac5f228b7367136017f.zip
Use stdint types
Avoid having our own custom stuff and instead use the modern, standard types, for familiarity.
Diffstat (limited to 'unix/x0vncserver')
-rw-r--r--unix/x0vncserver/XDesktop.cxx14
-rw-r--r--unix/x0vncserver/XDesktop.h2
-rw-r--r--unix/x0vncserver/XPixelBuffer.cxx2
3 files changed, 9 insertions, 9 deletions
diff --git a/unix/x0vncserver/XDesktop.cxx b/unix/x0vncserver/XDesktop.cxx
index 5f5366b7..0b6d7ef1 100644
--- a/unix/x0vncserver/XDesktop.cxx
+++ b/unix/x0vncserver/XDesktop.cxx
@@ -510,7 +510,7 @@ KeyCode XDesktop::keysymToKeycode(Display* dpy, KeySym keysym) {
}
-void XDesktop::keyEvent(rdr::U32 keysym, rdr::U32 xtcode, bool down) {
+void XDesktop::keyEvent(uint32_t keysym, uint32_t xtcode, bool down) {
#ifdef HAVE_XTEST
int keycode = 0;
@@ -944,20 +944,20 @@ bool XDesktop::setCursor()
// Copied from XserverDesktop::setCursor() in
// unix/xserver/hw/vnc/XserverDesktop.cc and adapted to
- // handle long -> U32 conversion for 64-bit Xlib
- rdr::U8* cursorData;
- rdr::U8 *out;
+ // handle long -> uint32_t conversion for 64-bit Xlib
+ uint8_t* cursorData;
+ uint8_t *out;
const unsigned long *pixels;
- cursorData = new rdr::U8[cim->width * cim->height * 4];
+ cursorData = new uint8_t[cim->width * cim->height * 4];
// Un-premultiply alpha
pixels = cim->pixels;
out = cursorData;
for (int y = 0; y < cim->height; y++) {
for (int x = 0; x < cim->width; x++) {
- rdr::U8 alpha;
- rdr::U32 pixel = *pixels++;
+ uint8_t alpha;
+ uint32_t pixel = *pixels++;
alpha = (pixel >> 24) & 0xff;
if (alpha == 0)
diff --git a/unix/x0vncserver/XDesktop.h b/unix/x0vncserver/XDesktop.h
index 6ebcd9f8..02217496 100644
--- a/unix/x0vncserver/XDesktop.h
+++ b/unix/x0vncserver/XDesktop.h
@@ -58,7 +58,7 @@ public:
KeyCode addKeysym(Display* dpy, KeySym keysym);
void deleteAddedKeysyms(Display* dpy);
KeyCode keysymToKeycode(Display* dpy, KeySym keysym);
- virtual void keyEvent(rdr::U32 keysym, rdr::U32 xtcode, bool down);
+ virtual void keyEvent(uint32_t keysym, uint32_t xtcode, bool down);
virtual void clientCutText(const char* str);
virtual unsigned int setScreenLayout(int fb_width, int fb_height,
const rfb::ScreenSet& layout);
diff --git a/unix/x0vncserver/XPixelBuffer.cxx b/unix/x0vncserver/XPixelBuffer.cxx
index 7107bfcb..b7506513 100644
--- a/unix/x0vncserver/XPixelBuffer.cxx
+++ b/unix/x0vncserver/XPixelBuffer.cxx
@@ -54,7 +54,7 @@ XPixelBuffer::XPixelBuffer(Display *dpy, ImageFactory &factory,
ffs(m_image->xim->blue_mask) - 1);
// Set up the remaining data of the parent class.
- setBuffer(rect.width(), rect.height(), (rdr::U8 *)m_image->xim->data,
+ setBuffer(rect.width(), rect.height(), (uint8_t *)m_image->xim->data,
m_image->xim->bytes_per_line * 8 / m_image->xim->bits_per_pixel);
// Get initial screen image from the X display.