By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1583
Collapse All | Expand All

(-)a/admin (-1 / +1 lines)
Line 1 Link Here
1
Subproject commit 9f768663f33e818a14dff26b403bae12a447a9ec
1
Subproject commit 9f768663f33e818a14dff26b403bae12a447a9ec-dirty
(-)a/krfb/krfb/rfbcontroller.cc (-4 / +25 lines)
Lines 286-309 PointerEvent::PointerEvent(int b, int _x, int _y) : Link Here
286
		initialized = true;
286
		initialized = true;
287
		dpy = tqt_xdisplay();
287
		dpy = tqt_xdisplay();
288
		buttonMask = 0;
288
		buttonMask = 0;
289
290
		// Set up default map in case XGetPointerMapping fails
291
		for (int i=0; i<MAX_BUTTONS; i++) {
292
			map[i] = i+1;
293
		}
294
		XGetPointerMapping(dpy, map, MAX_BUTTONS);
295
printf("[krfb] [DEBUG] Pointer mapping: %d %d %d %d %d\n", map[0], map[1], map[2], map[3], map[4]); fflush(stdout);
289
	}
296
	}
290
}
297
}
291
298
292
void PointerEvent::exec() {
299
void PointerEvent::exec() {
300
if (buttonMask != button_mask) printf("[krfb] [DEBUG] Entering PointerEvent::exec()\n"); fflush(stdout);
293
	TQDesktopWidget *desktopWidget = TQApplication::desktop();
301
	TQDesktopWidget *desktopWidget = TQApplication::desktop();
294
302
295
	int screen = desktopWidget->screenNumber();
303
	int screen = desktopWidget->screenNumber();
296
	if (screen < 0)
304
	if (screen < 0) {
297
		screen = 0;
305
		screen = 0;
306
	}
298
	XTestFakeMotionEvent(dpy, screen, x, y, CurrentTime);
307
	XTestFakeMotionEvent(dpy, screen, x, y, CurrentTime);
299
	for(int i = 0; i < 5; i++)
308
	for(int i = 0; i < MAX_BUTTONS; i++) {
300
		if ((buttonMask&(1<<i))!=(button_mask&(1<<i)))
309
		if ((buttonMask&(1<<i))!=(button_mask&(1<<i))) {
310
			int localButton = i+1;
311
printf("[krfb] [DEBUG] PointerEvent::exec() remote requested button %d\n", localButton); fflush(stdout);
312
			for (int j=0; j<MAX_BUTTONS; j++) {
313
				if (map[j] == localButton) {
314
					localButton = j+1;
315
					break;
316
				}
317
			}
318
printf("[krfb] [DEBUG] PointerEvent::exec() using local button %d\n", localButton); fflush(stdout);
301
			XTestFakeButtonEvent(dpy,
319
			XTestFakeButtonEvent(dpy,
302
					     i+1,
320
					     localButton,
303
					     (button_mask&(1<<i))?True:False,
321
					     (button_mask&(1<<i))?True:False,
304
					     CurrentTime);
322
					     CurrentTime);
323
		}
324
	}
305
325
306
	buttonMask = button_mask;
326
	buttonMask = button_mask;
327
if (buttonMask != button_mask) printf("[krfb] [DEBUG] Exiting PointerEvent::exec()\n"); fflush(stdout);
307
}
328
}
308
329
309
330
(-)a/krfb/krfb/rfbcontroller.h (-1 / +3 lines)
Lines 36-42 Link Here
36
36
37
#include <X11/Xlib.h>
37
#include <X11/Xlib.h>
38
38
39
39
#define MAX_BUTTONS 5
40
40
41
class TQCloseEvent;
41
class TQCloseEvent;
42
class TQClipboard;
42
class TQClipboard;
Lines 82-87 class PointerEvent : public VNCEvent { Link Here
82
	static bool initialized;
82
	static bool initialized;
83
	static Display *dpy;
83
	static Display *dpy;
84
	static int buttonMask;
84
	static int buttonMask;
85
86
	unsigned char map[MAX_BUTTONS];
85
public:
87
public:
86
	PointerEvent(int b, int _x, int _y);
88
	PointerEvent(int b, int _x, int _y);
87
	virtual void exec();
89
	virtual void exec();

Return to bug 1583