Репозитории ALT
S: | 1.17.0-alt9 |
5.1: | 1.17.0-alt8 |
4.1: | 1.17.0-alt6 |
4.0: | 1.17.0-alt6 |
3.0: | 1.17.0-alt6 |
Группа :: Графика
Пакет: xli
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: 110-arrow_keys.patch
Скачать
Скачать
Make xli handle the arrow keys to move the image
in the specified direction. by Bernhard R. Link in #179268
Index: xli-1.17.0+20061110/window.c
===================================================================
--- xli-1.17.0+20061110.orig/window.c
+++ xli-1.17.0+20061110/window.c
@@ -800,8 +800,34 @@ char imageInWindow(DisplayInfo *dinfo, I
XComposeStatus status;
char ret;
Cursor cursor;
+ int num;
- if (XLookupString(&event.key, buf, 128, &ks, &status) != 1)
+ num = XLookupString(&event.key, buf, 128, &ks, &status);
+ if( num != 1 && ((image->width > winwidth) || (image->height > winheight))) {
+ switch (ks) {
+ case XK_Left:
+ case XK_KP_Left:
+ pixx += winwidth/10+1;
+ placeImage(disp, image->width, image->height, winwidth, winheight, &pixx, &pixy);
+ break;
+ case XK_Right:
+ case XK_KP_Right:
+ pixx -= winwidth/10+1;
+ placeImage(disp, image->width, image->height, winwidth, winheight, &pixx, &pixy);
+ break;
+ case XK_Up:
+ case XK_KP_Up:
+ pixy += winheight/10+1;
+ placeImage(disp, image->width, image->height, winwidth, winheight, &pixx, &pixy);
+ break;
+ case XK_Down:
+ case XK_KP_Down:
+ pixy -= winheight/10+1;
+ placeImage(disp, image->width, image->height, winwidth, winheight, &pixx, &pixy);
+ break;
+ }
+ }
+ if (num != 1)
break;
ret = buf[0];
if (isupper(ret))