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
f7168c86
Commit
f7168c86
authored
15 years ago
by
Birte Kristina Friesel
Browse files
Options
Downloads
Patches
Plain Diff
events.c: Make pointer warping work for zoomed images
parent
1657b7ce
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ChangeLog
+3
-0
3 additions, 0 deletions
ChangeLog
TODO
+0
-2
0 additions, 2 deletions
TODO
src/events.c
+2
-2
2 additions, 2 deletions
src/events.c
src/winwidget.h
+1
-1
1 addition, 1 deletion
src/winwidget.h
with
6 additions
and
5 deletions
ChangeLog
+
3
−
0
View file @
f7168c86
* git HEAD
* Warp the pointer when reaching a window border in pan mode
Fri Apr 2 16:20:55 CEST 2010 Daniel Friesel <derf@chaosdorf.de>
Fri Apr 2 16:20:55 CEST 2010 Daniel Friesel <derf@chaosdorf.de>
* Release v1.4.2
* Release v1.4.2
...
...
This diff is collapsed.
Click to expand it.
TODO
+
0
−
2
View file @
f7168c86
...
@@ -23,5 +23,3 @@ On screen 1, it will work if fullscreen is turned off, the window is rendered
...
@@ -23,5 +23,3 @@ On screen 1, it will work if fullscreen is turned off, the window is rendered
and moved so that its top corner is only on screen 1, and then fullscreen is
and moved so that its top corner is only on screen 1, and then fullscreen is
turned on (after that, it'll work for all images in the slideshow).
turned on (after that, it'll work for all images in the slideshow).
Maybe I'll someday find out how to fix that :>
Maybe I'll someday find out how to fix that :>
In zoom / pan mode: Warp the mouse when reaching a screen corner.
This diff is collapsed.
Click to expand it.
src/events.c
+
2
−
2
View file @
f7168c86
...
@@ -473,7 +473,7 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
...
@@ -473,7 +473,7 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
winwid
->
click_offset_x
-=
winwid
->
w
-
4
;
winwid
->
click_offset_x
-=
winwid
->
w
-
4
;
}
}
else
if
((
ev
->
xmotion
.
x
<=
1
)
&&
(
winwid
->
click_offset_x
else
if
((
ev
->
xmotion
.
x
<=
1
)
&&
(
winwid
->
click_offset_x
<=
winwid
->
im_w
-
winwid
->
w
-
3
))
<=
(
winwid
->
im_w
*
winwid
->
zoom
)
-
winwid
->
w
-
3
))
{
{
XWarpPointer
(
disp
,
None
,
winwid
->
win
,
0
,
0
,
0
,
0
,
XWarpPointer
(
disp
,
None
,
winwid
->
win
,
0
,
0
,
0
,
0
,
winwid
->
w
-
4
,
ev
->
xmotion
.
y
);
winwid
->
w
-
4
,
ev
->
xmotion
.
y
);
...
@@ -487,7 +487,7 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
...
@@ -487,7 +487,7 @@ static void feh_event_handle_MotionNotify(XEvent * ev)
winwid
->
click_offset_y
-=
winwid
->
h
-
4
;
winwid
->
click_offset_y
-=
winwid
->
h
-
4
;
}
}
else
if
((
ev
->
xmotion
.
y
<=
1
)
&&
(
winwid
->
click_offset_y
else
if
((
ev
->
xmotion
.
y
<=
1
)
&&
(
winwid
->
click_offset_y
<=
winwid
->
im_h
-
winwid
->
h
-
3
))
<=
(
winwid
->
im_h
*
winwid
->
zoom
)
-
winwid
->
h
-
3
))
{
{
XWarpPointer
(
disp
,
None
,
winwid
->
win
,
0
,
0
,
0
,
0
,
XWarpPointer
(
disp
,
None
,
winwid
->
win
,
0
,
0
,
0
,
0
,
ev
->
xmotion
.
x
,
winwid
->
h
-
4
);
ev
->
xmotion
.
x
,
winwid
->
h
-
4
);
...
...
This diff is collapsed.
Click to expand it.
src/winwidget.h
+
1
−
1
View file @
f7168c86
...
@@ -100,7 +100,7 @@ struct __winwidget {
...
@@ -100,7 +100,7 @@ struct __winwidget {
/* New stuff */
/* New stuff */
int
im_x
;
/* image offset from window top left */
int
im_x
;
/* image offset from window top left */
int
im_y
;
/* image offset from window top left */
int
im_y
;
/* image offset from window top left */
double
zoom
;
/* From 0 (not visible) to 100 (actual size)
double
zoom
;
/* From 0 (not visible) to 1
.
00 (actual size)
all the way up to INT_MAX (ouch) */
all the way up to INT_MAX (ouch) */
int
click_offset_x
;
int
click_offset_x
;
int
click_offset_y
;
int
click_offset_y
;
...
...
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