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.6/krfb/krfb/rfbcontroller.cc~ (+53 lines)
Lines 184-192 Link Here
184
const int KeyboardEvent::ALTGR = 4;
184
const int KeyboardEvent::ALTGR = 4;
185
char KeyboardEvent::ModifierState;
185
char KeyboardEvent::ModifierState;
186
186
187
static KeySym added_keysyms[0x100];
188
187
KeyboardEvent::KeyboardEvent(bool d, KeySym k) :
189
KeyboardEvent::KeyboardEvent(bool d, KeySym k) :
188
	down(d),
190
	down(d),
189
	keySym(k) {
191
	keySym(k) {
192
193
    if(k && !IsModifierKey(k))	add_keysym(k);
190
}
194
}
191
195
192
void KeyboardEvent::initKeycodes() {
196
void KeyboardEvent::initKeycodes() {
Lines 221-226 Link Here
221
	XFree ((char *)keymap);
225
	XFree ((char *)keymap);
222
}
226
}
223
227
228
int KeyboardEvent::add_keysym( KeySym keysym )
229
{
230
    static int first = 1;
231
    if(first) {
232
	for(int n = 0; n < 0x100; n++)
233
	    added_keysyms[n] = NoSymbol;
234
	first = 0;
235
    }
236
237
    if(keysym == NoSymbol)	return 0;
238
239
    /* there can be a race before MappingNotify */
240
    for(int n = 0; n < 0x100; n++)
241
	if(added_keysyms[n] == keysym)	return n;
242
243
    int minkey, maxkey, syms_per_keycode, kc, ret = 0;
244
    XDisplayKeycodes(dpy, &minkey, &maxkey);
245
    KeySym *keymap = XGetKeyboardMapping(dpy, minkey, (maxkey-minkey+1), &syms_per_keycode);
246
247
    for(int kc = minkey+1; kc <= maxkey; kc++) {
248
	int j, didmsg = 0, is_empty = 1;
249
	char *str;
250
	KeySym newks[8];
251
252
	for(int n = 0; n < syms_per_keycode; n++) {
253
	    if(keymap[(kc-minkey)*syms_per_keycode+n] != NoSymbol)
254
	    { is_empty = 0; break; }
255
	}
256
	if(!is_empty)	continue;
257
258
	for(int i = 0; i < 8; i++)	newks[i] = NoSymbol;
259
	for(int i = 0; i < syms_per_keycode; i++) {
260
	    newks[i] = keysym;
261
	    if(i >= 7) break;
262
	}
263
264
	XChangeKeyboardMapping(dpy, kc, syms_per_keycode, newks, 1);
265
266
	XFlush(dpy);
267
	added_keysyms[kc] = keysym;
268
	ret = kc;
269
	break;
270
    }
271
272
    XFree(keymap);
273
274
    return ret;
275
}
276
224
/* this function adjusts the modifiers according to mod (as from modifiers) and ModifierState */
277
/* this function adjusts the modifiers according to mod (as from modifiers) and ModifierState */
225
void KeyboardEvent::tweakModifiers(signed char mod, bool down) {
278
void KeyboardEvent::tweakModifiers(signed char mod, bool down) {
226
279
(-)tdenetwork-trinity-14.0.6/krfb/krfb/rfbcontroller.h~ (+1 lines)
Lines 73-78 Link Here
73
	static void initKeycodes();
73
	static void initKeycodes();
74
74
75
	KeyboardEvent(bool d, KeySym k);
75
	KeyboardEvent(bool d, KeySym k);
76
	int add_keysym( KeySym keysym );
76
	virtual void exec();
77
	virtual void exec();
77
};
78
};
78
79

Return to bug 3014