Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37690439
en ru br
ALT Linux repositórios
S:1.17.0-alt9
5.0: 1.17.0-alt8
4.1: 1.17.0-alt6
4.0: 1.17.0-alt6
3.0: 1.17.0-alt6

Group :: Gráficos
RPM: xli

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: 110-arrow_keys.patch
Download


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))
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009