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 3014
Collapse All | Expand All

(-)tdenetwork-trinity-14.0.7/krfb/krfb/rfbcontroller.cc~ (-9 / +35 lines)
Lines 183-196 Link Here
183
const int KeyboardEvent::RIGHTSHIFT = 2;
183
const int KeyboardEvent::RIGHTSHIFT = 2;
184
const int KeyboardEvent::ALTGR = 4;
184
const int KeyboardEvent::ALTGR = 4;
185
char KeyboardEvent::ModifierState;
185
char KeyboardEvent::ModifierState;
186
186
KeySym KeyboardEvent::added_keysyms[0x100];
187
static KeySym added_keysyms[0x100];
188
187
189
KeyboardEvent::KeyboardEvent(bool d, KeySym k) :
188
KeyboardEvent::KeyboardEvent(bool d, KeySym k) :
190
	down(d),
189
	down(d),
191
	keySym(k) {
190
	keySym(k) {
192
191
193
    if(k && !IsModifierKey(k))	add_keysym(k);
192
    if(k && !IsModifierKey(k) && XKeysymToKeycode(dpy,k) == NoSymbol)	add_keysym(k);
194
}
193
}
195
194
196
void KeyboardEvent::initKeycodes() {
195
void KeyboardEvent::initKeycodes() {
Lines 242-258 Link Here
242
241
243
    int minkey, maxkey, syms_per_keycode, kc, ret = 0;
242
    int minkey, maxkey, syms_per_keycode, kc, ret = 0;
244
    XDisplayKeycodes(dpy, &minkey, &maxkey);
243
    XDisplayKeycodes(dpy, &minkey, &maxkey);
244
245
    repeate:
245
    KeySym *keymap = XGetKeyboardMapping(dpy, minkey, (maxkey-minkey+1), &syms_per_keycode);
246
    KeySym *keymap = XGetKeyboardMapping(dpy, minkey, (maxkey-minkey+1), &syms_per_keycode);
246
247
248
    bool is_empty = true;
247
    for(int kc = minkey+1; kc <= maxkey; kc++) {
249
    for(int kc = minkey+1; kc <= maxkey; kc++) {
248
	int j, didmsg = 0, is_empty = 1;
249
	char *str;
250
	KeySym newks[8];
250
	KeySym newks[8];
251
251
252
	for(int n = 0; n < syms_per_keycode; n++) {
252
	is_empty = true;
253
	for(int n = 0; n < syms_per_keycode; n++)
253
	    if(keymap[(kc-minkey)*syms_per_keycode+n] != NoSymbol)
254
	    if(keymap[(kc-minkey)*syms_per_keycode+n] != NoSymbol)
254
	    { is_empty = 0; break; }
255
	    { is_empty = false; break; }
255
	}
256
	if(!is_empty)	continue;
256
	if(!is_empty)	continue;
257
257
258
	for(int i = 0; i < 8; i++)	newks[i] = NoSymbol;
258
	for(int i = 0; i < 8; i++)	newks[i] = NoSymbol;
Lines 268-279 Link Here
268
	ret = kc;
268
	ret = kc;
269
	break;
269
	break;
270
    }
270
    }
271
272
    XFree(keymap);
271
    XFree(keymap);
273
272
273
    if(!is_empty) { delete_added_keycodes(); goto repeate; }
274
274
    return ret;
275
    return ret;
275
}
276
}
276
277
278
void KeyboardEvent::delete_added_keycodes( )
279
{
280
    for(int kc = 0; kc < 0x100; kc++)
281
	if(added_keysyms[kc] != NoSymbol) {
282
	    added_keysyms[kc] = NoSymbol;
283
284
	    int minkey, maxkey, syms_per_keycode, i;
285
	    KeySym *keymap;
286
	    KeySym ksym, newks[8];
287
	    char *str;
288
289
	    XDisplayKeycodes(dpy, &minkey, &maxkey);
290
	    keymap = XGetKeyboardMapping(dpy, minkey, (maxkey - minkey + 1), &syms_per_keycode);
291
292
	    for (i = 0; i < 8; i++) newks[i] = NoSymbol;
293
294
	    XChangeKeyboardMapping(dpy, kc, syms_per_keycode, newks, 1);
295
296
	    XFree(keymap);
297
	    XFlush(dpy);
298
	}
299
}
300
277
/* this function adjusts the modifiers according to mod (as from modifiers) and ModifierState */
301
/* this function adjusts the modifiers according to mod (as from modifiers) and ModifierState */
278
void KeyboardEvent::tweakModifiers(signed char mod, bool down) {
302
void KeyboardEvent::tweakModifiers(signed char mod, bool down) {
279
303
Lines 431-436 Link Here
431
455
432
RFBController::~RFBController()
456
RFBController::~RFBController()
433
{
457
{
458
	KeyboardEvent::delete_added_keycodes();
459
434
	stopServer();
460
	stopServer();
435
}
461
}
436
462
(-)tdenetwork-trinity-14.0.7/krfb/krfb/rfbcontroller.h~ (-1 / +3 lines)
Lines 67-79 Link Here
67
	static const int RIGHTSHIFT;
67
	static const int RIGHTSHIFT;
68
	static const int ALTGR;
68
	static const int ALTGR;
69
	static char ModifierState;
69
	static char ModifierState;
70
	static KeySym added_keysyms[0x100];
70
71
71
	static void tweakModifiers(signed char mod, bool down);
72
	static void tweakModifiers(signed char mod, bool down);
72
public:
73
public:
73
	static void initKeycodes();
74
	static void initKeycodes();
74
75
75
	KeyboardEvent(bool d, KeySym k);
76
	KeyboardEvent(bool d, KeySym k);
76
	int add_keysym( KeySym keysym );
77
	static int add_keysym( KeySym keysym );
78
	static void delete_added_keycodes( );
77
	virtual void exec();
79
	virtual void exec();
78
};
80
};
79
81

Return to bug 3014