Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
feh
Commits
03eb45b2
Commit
03eb45b2
authored
13 years ago
by
Birte Kristina Friesel
Browse files
Options
Downloads
Patches
Plain Diff
Accept offset-only arguments for --geometry (closes #73)
parent
2c773b0a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
ChangeLog
+2
-0
2 additions, 0 deletions
ChangeLog
man/feh.pre
+1
-1
1 addition, 1 deletion
man/feh.pre
src/winwidget.c
+5
-4
5 additions, 4 deletions
src/winwidget.c
test/feh-scr.i
+8
-1
8 additions, 1 deletion
test/feh-scr.i
test/scr/geometry_offset_only
+0
-0
0 additions, 0 deletions
test/scr/geometry_offset_only
with
16 additions
and
6 deletions
ChangeLog
+
2
−
0
View file @
03eb45b2
...
...
@@ -11,6 +11,8 @@ git HEAD
(-f and -F may get mixed up)
<https://github.com/derf/feh/issues/79>
* Patch by Dennis Real: Add optional EXIF tag view support (make exif=1)
* Accept offset-only arguments for --geometry
<https://github.com/derf/feh/issues/73>
Mon, 02 Jan 2012 11:54:01 +0100 Daniel Friesel <derf@finalrewind.org>
...
...
This diff is collapsed.
Click to expand it.
man/feh.pre
+
1
−
1
View file @
03eb45b2
...
...
@@ -290,7 +290,7 @@ screen size. The only exception is a
of 100, in which case images will always be shown at 100% zoom, no matter
their dimensions.
.
.It Cm -g , --geometry Ar width No x Ar height Op + Ar x No + Ar y
.It Cm -g , --geometry
Oo
Ar width No x Ar height
Oc
Op + Ar x No + Ar y
.
Limit (and don't change) the window size. Takes an X-style geometry
.Ar string
...
...
This diff is collapsed.
Click to expand it.
src/winwidget.c
+
5
−
4
View file @
03eb45b2
...
...
@@ -410,19 +410,20 @@ void winwidget_render_image(winwidget winwid, int resize, int force_alias)
D
((
"after scaling down image %dx%d
\n
"
,
winwid
->
w
,
winwid
->
h
));
}
if
(
!
winwid
->
full_screen
&&
((
gib_imlib_image_has_alpha
(
winwid
->
im
))
||
(
opt
.
geom_flags
)
if
(
!
winwid
->
full_screen
&&
((
gib_imlib_image_has_alpha
(
winwid
->
im
))
||
(
opt
.
geom_flags
&
(
WidthValue
|
HeightValue
))
||
(
winwid
->
im_x
||
winwid
->
im_y
)
||
(
winwid
->
zoom
!=
1
.
0
)
||
(
winwid
->
w
>
winwid
->
im_w
||
winwid
->
h
>
winwid
->
im_h
)
||
(
winwid
->
has_rotated
)))
feh_draw_checks
(
winwid
);
if
(
!
winwid
->
full_screen
&&
opt
.
zoom_mode
&&
(
winwid
->
zoom
==
1
.
0
)
&&
!
opt
.
geom_flags
&&
(
winwid
->
zoom
==
1
.
0
)
&&
!
(
opt
.
geom_flags
&
(
WidthValue
|
HeightValue
))
&&
(
winwid
->
w
>
winwid
->
im_w
)
&&
(
winwid
->
h
>
winwid
->
im_h
))
feh_calc_needed_zoom
(
&
(
winwid
->
zoom
),
winwid
->
im_w
,
winwid
->
im_h
,
winwid
->
w
,
winwid
->
h
);
if
(
resize
&&
(
winwid
->
full_screen
||
opt
.
geom_flags
))
{
if
(
resize
&&
(
winwid
->
full_screen
||
(
opt
.
geom_flags
&
(
WidthValue
|
HeightValue
))
))
{
int
smaller
;
/* Is the image smaller than screen? */
int
max_w
=
0
,
max_h
=
0
;
...
...
@@ -810,7 +811,7 @@ void winwidget_resize(winwidget winwid, int w, int h)
D
((
" x %d y %d w %d h %d
\n
"
,
attributes
.
x
,
attributes
.
y
,
winwid
->
w
,
winwid
->
h
));
if
(
opt
.
geom_flags
)
{
if
(
opt
.
geom_flags
&
(
WidthValue
|
HeightValue
)
)
{
winwid
->
had_resize
=
1
;
return
;
}
...
...
This diff is collapsed.
Click to expand it.
test/feh-scr.i
+
8
−
1
View file @
03eb45b2
...
...
@@ -6,7 +6,7 @@ use autodie qw/:all/;
use
Cwd
;
use
GD
qw
/:
DEFAULT
:
cmp
/
;
use
Test
::
More
tests
=>
5
3
;
use
Test
::
More
tests
=>
5
4
;
use
Time
::
HiRes
qw
/
sleep
/
;
use
X11
::
GUITest
qw
/:
ALL
/
;
...
...
@@ -194,6 +194,13 @@ feh_start(
test_scr
(
'
index_full_h400
'
)
;
feh_stop
()
;
feh_start
(
'
--geometry +10+20
'
,
'
test/ok/png
'
)
;
test_scr
(
'
geometry_offset_only
'
)
;
feh_stop
()
;
feh_start
(
'
--caption-path .tc
'
,
'
test/bg/exact/in
'
...
...
This diff is collapsed.
Click to expand it.
test/scr/geometry_offset_only
0 → 100644
+
0
−
0
View file @
03eb45b2
File added
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment