Diffstat (limited to 'noncore/comm/keypebble/krfbdecoder.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/krfbdecoder.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp index a964c09..94e3b79 100644 --- a/noncore/comm/keypebble/krfbdecoder.cpp +++ b/noncore/comm/keypebble/krfbdecoder.cpp | |||
@@ -192,13 +192,13 @@ void KRFBDecoder::gotServerInit() | |||
192 | info->bpp, info->depth, info->bigEndian, info->trueColor ); | 192 | info->bpp, info->depth, info->bigEndian, info->trueColor ); |
193 | qWarning( "RedMax = %d, GreenMax = %d, BlueMax = %d", | 193 | qWarning( "RedMax = %d, GreenMax = %d, BlueMax = %d", |
194 | info->redMax, info->greenMax, info->blueMax ); | 194 | info->redMax, info->greenMax, info->blueMax ); |
195 | qWarning( "RedShift = %d, GreenShift = %d, BlueShift = %d", | 195 | qWarning( "RedShift = %d, GreenShift = %d, BlueShift = %d", |
196 | info->redShift, info->greenShift,info-> blueShift ); | 196 | info->redShift, info->greenShift,info-> blueShift ); |
197 | 197 | ||
198 | buf->resize( info->width, info->height ); | 198 | buf->resize( info->width/con->options()->scaleFactor, info->height /con->options()->scaleFactor); |
199 | 199 | ||
200 | // Wait for desktop name | 200 | // Wait for desktop name |
201 | qWarning( "Waiting for desktop name" ); | 201 | qWarning( "Waiting for desktop name" ); |
202 | 202 | ||
203 | static QString statusMsg = tr( "Waiting for desktop name..." ); | 203 | static QString statusMsg = tr( "Waiting for desktop name..." ); |
204 | emit status( statusMsg ); | 204 | emit status( statusMsg ); |
@@ -639,14 +639,15 @@ void KRFBDecoder::sendMouseEvent( QMouseEvent *e ) | |||
639 | buttonMask |= 0x03; | 639 | buttonMask |= 0x03; |
640 | if ( e->button() & RightButton ) | 640 | if ( e->button() & RightButton ) |
641 | buttonMask |= 0x05; | 641 | buttonMask |= 0x05; |
642 | } | 642 | } |
643 | } | 643 | } |
644 | 644 | ||
645 | CARD16 x = Swap16IfLE( e->x() ); | 645 | // HACK: Scaling |
646 | CARD16 y = Swap16IfLE( e->y() ); | 646 | CARD16 x = Swap16IfLE( e->x() * con->options()->scaleFactor ); |
647 | CARD16 y = Swap16IfLE( e->y() *con->options()->scaleFactor ); | ||
647 | 648 | ||
648 | con->write( &PointerEventId, 1 ); | 649 | con->write( &PointerEventId, 1 ); |
649 | con->write( &buttonMask, 1 ); | 650 | con->write( &buttonMask, 1 ); |
650 | con->write( &x, 2 ); | 651 | con->write( &x, 2 ); |
651 | con->write( &y, 2 ); | 652 | con->write( &y, 2 ); |
652 | } | 653 | } |