Репозитории 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
Патч: 080-fillscreen_forall.patch
Скачать
Скачать
This patch adds a -forall option, that avoids -fillscreen and
-onroot to be be limited on the first image, and keeps -fillscreen
over rotating images. by Bernhard R. Link in #48878
Index: xli-1.17.0+20061110/options.c
===================================================================
--- xli-1.17.0+20061110.orig/options.c
+++ xli-1.17.0+20061110/options.c
@@ -42,6 +42,8 @@ so that it just fits the size of the scr
it will be zoomed to completely fill the screen.",},
{"fit", FIT, NULL, "\
Force the image(s) to use the default colormap.",},
+ {"forall", FORALL, NULL, "\
+Avoid fillscreen and onroot handling the first image specially.\n",},
{"fork", FORK, NULL, "\
Background automatically. Turns on -quiet.",},
{"fullscreen", FULLSCREEN, NULL, "\
@@ -392,6 +394,10 @@ int doGeneralOption(OptionId opid, char
globals.fit = TRUE;
break;
+ case FORALL:
+ globals.forall = TRUE;
+ break;
+
case FORK:
globals.do_fork = TRUE;
/* background processes should be seen but not heard */
Index: xli-1.17.0+20061110/options.h
===================================================================
--- xli-1.17.0+20061110.orig/options.h
+++ xli-1.17.0+20061110/options.h
@@ -34,6 +34,7 @@ typedef enum option_id {
FILLSCREEN,
FIT,
FORK,
+ FORALL,
FULLSCREEN,
GOTO,
GEOMETRY,
Index: xli-1.17.0+20061110/xli.c
===================================================================
--- xli-1.17.0+20061110.orig/xli.c
+++ xli-1.17.0+20061110/xli.c
@@ -154,6 +154,7 @@ int main(int argc, char *argv[])
globals.dname = NULL;
globals.fit = FALSE;
+ globals.forall = FALSE;
globals.fillscreen = FALSE;
globals.fullscreen = FALSE;
globals.go_to = NULL;
@@ -331,7 +332,8 @@ int main(int argc, char *argv[])
* in fullscreen mode, set zoom factors to something reasonable
*/
- if (first && ((globals.onroot && globals.fullscreen) ||
+ if ( (first || globals.forall) &&
+ ((globals.onroot && globals.fullscreen) ||
globals.fillscreen) && !io->xzoom &&
!io->yzoom && !io->center) {
double wr, hr;
@@ -370,7 +372,8 @@ int main(int argc, char *argv[])
* else if this is the first image on root
* set its position and any border needed
*/
- if (first && globals.onroot && (winwidth || winheight ||
+ if ( (first || globals.forall) &&
+ globals.onroot && (winwidth || winheight ||
io->center || io->ats || globals.fullscreen ||
globals.fillscreen)) {
int atx = io->atx, aty = io->aty;
@@ -527,6 +530,16 @@ int main(int argc, char *argv[])
io->rotate -= 360;
while (io->rotate < 0)
io->rotate += 360;
+ if ( globals.forall &&
+ ((globals.onroot && globals.fullscreen) ||
+ globals.fillscreen) && !io->center) {
+ double wr, hr,f;
+ wr = (double) globals.dinfo.width / inew->height;
+ hr = (double) globals.dinfo.height / inew->width;
+ f = (((wr < hr) ^ (globals.onroot && globals.fillscreen)) ? wr : hr) * 100;
+ io->xzoom *= f/100.0;
+ io->yzoom *= f/100.0;
+ }
if (globals.verbose)
printf("Image rotation is now %d\n",
io->rotate);
Index: xli-1.17.0+20061110/xli.h
===================================================================
--- xli-1.17.0+20061110.orig/xli.h
+++ xli-1.17.0+20061110/xli.h
@@ -82,6 +82,7 @@ typedef struct {
float display_gamma;
char *dname;
boolean do_fork;
+ boolean forall;
boolean fillscreen;
boolean fit;
boolean fullscreen;