Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | x11.c: Minor fixes; use new API. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | ams/sdl |
| Files: | files | file ages | folders |
| SHA3-256: |
ef2b653529604ba80692b86fd5faf526 |
| User & Date: | ams 2024-06-25 07:04:53.657 |
Context
|
2024-06-25
| ||
| 07:36 | sdl2.c: Handle C-aaaa... properly. check-in: 8955c86dcc user: ams tags: ams/sdl | |
| 07:04 | x11.c: Minor fixes; use new API. check-in: ef2b653529 user: ams tags: ams/sdl | |
|
2024-06-19
| ||
| 07:15 | Indent files. check-in: cb74f9ba59 user: ams tags: ams/sdl | |
Changes
Changes to x11.c.
| ︙ | ︙ | |||
185 186 187 188 189 190 191 |
if (e->xkey.state & Mod4Mask)
knight_process_bucky(Mod4MapIndex, &bi);
if (e->xkey.state & Mod5Mask)
knight_process_bucky(Mod5MapIndex, &bi);
knight_process_key(keysym, bi, keydown);
} else {
bi = x11_bucky(keycode);
| | | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
if (e->xkey.state & Mod4Mask)
knight_process_bucky(Mod4MapIndex, &bi);
if (e->xkey.state & Mod5Mask)
knight_process_bucky(Mod5MapIndex, &bi);
knight_process_key(keysym, bi, keydown);
} else {
bi = x11_bucky(keycode);
cadet_process_key(keysym, bi, keydown, &cadet_allup_key);
}
}
static int u_minh = 0x7fffffff;
static int u_maxh;
static int u_minv = 0x7fffffff;
static int u_maxv;
|
| ︙ | ︙ | |||
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
}
XDrawLine(display, window, idle_gc, tv_width - width - right, tv_height - bottom, tv_width - right, tv_height - bottom);
}
void
x11_beep(void)
{
XKeyboardControl kc;
XKeyboardControl okc;
static int onoff = 100;
onoff = -onoff;
XGetKeyboardControl(display, &okc);
kc.key_click_percent = 0; /* 0 - 100 */
kc.bell_percent = 100; /* 0 - 100 */
kc.bell_pitch = 755; /* Hz */
kc.bell_duration = 10; /* milliseconds */
XChangeKeyboardControl(display, KBBellPercent | KBBellPitch | KBBellDuration, &kc);
XBell(display, onoff); /* display, percent */
XChangeKeyboardControl(display, KBBellPercent | KBBellPitch | KBBellDuration, &okc);
}
void
x11_event(void)
{
XEvent e;
| > > | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
}
XDrawLine(display, window, idle_gc, tv_width - width - right, tv_height - bottom, tv_width - right, tv_height - bottom);
}
void
x11_beep(void)
{
#if 0
XKeyboardControl kc;
XKeyboardControl okc;
static int onoff = 100;
onoff = -onoff;
XGetKeyboardControl(display, &okc);
kc.key_click_percent = 0; /* 0 - 100 */
kc.bell_percent = 100; /* 0 - 100 */
kc.bell_pitch = 755; /* Hz */
kc.bell_duration = 10; /* milliseconds */
XChangeKeyboardControl(display, KBBellPercent | KBBellPitch | KBBellDuration, &kc);
XBell(display, onoff); /* display, percent */
XChangeKeyboardControl(display, KBBellPercent | KBBellPitch | KBBellDuration, &okc);
#endif
}
void
x11_event(void)
{
XEvent e;
|
| ︙ | ︙ | |||
291 292 293 294 295 296 297 | case ButtonPress: case ButtonRelease: mouse_event(e.xbutton.x, e.xbutton.y, e.xbutton.button); break; case EnterNotify: /* Switching between windows, assume all keys up */ if (kbd_type == 1) | | | 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | case ButtonPress: case ButtonRelease: mouse_event(e.xbutton.x, e.xbutton.y, e.xbutton.button); break; case EnterNotify: /* Switching between windows, assume all keys up */ if (kbd_type == 1) cadet_allup_key(); if (x11_grab_keyboard == true) XGrabKeyboard(display, window, True, GrabModeAsync, GrabModeAsync, CurrentTime); break; case LeaveNotify: if (x11_grab_keyboard == true) XUngrabKeyboard(display, CurrentTime); break; |
| ︙ | ︙ |