projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http://ftp.ksu.edu.tw/FTP/FreeBSD/distfiles/xscreensaver-4.20.tar.gz
[xscreensaver]
/
hacks
/
glx
/
lavalite.c
diff --git
a/hacks/glx/lavalite.c
b/hacks/glx/lavalite.c
index c544e72cd18c0a39fbc2115bd2fa39df05080c67..c97c7929b4ae49febddcb3ddceb3990d4f2b577d 100644
(file)
--- a/
hacks/glx/lavalite.c
+++ b/
hacks/glx/lavalite.c
@@
-1267,7
+1267,7
@@
lavalite_handle_event (ModeInfo *mi, XEvent *event)
lavalite_configuration *bp = &bps[MI_SCREEN(mi)];
if (event->xany.type == ButtonPress &&
lavalite_configuration *bp = &bps[MI_SCREEN(mi)];
if (event->xany.type == ButtonPress &&
- event->xbutton.button
&
Button1)
+ event->xbutton.button
==
Button1)
{
bp->button_down_p = True;
gltrackball_start (bp->trackball,
{
bp->button_down_p = True;
gltrackball_start (bp->trackball,
@@
-1276,11
+1276,19
@@
lavalite_handle_event (ModeInfo *mi, XEvent *event)
return True;
}
else if (event->xany.type == ButtonRelease &&
return True;
}
else if (event->xany.type == ButtonRelease &&
- event->xbutton.button
&
Button1)
+ event->xbutton.button
==
Button1)
{
bp->button_down_p = False;
return True;
}
{
bp->button_down_p = False;
return True;
}
+ else if (event->xany.type == ButtonPress &&
+ (event->xbutton.button == Button4 ||
+ event->xbutton.button == Button5))
+ {
+ gltrackball_mousewheel (bp->trackball, event->xbutton.button, 5,
+ !!event->xbutton.state);
+ return True;
+ }
else if (event->xany.type == MotionNotify &&
bp->button_down_p)
{
else if (event->xany.type == MotionNotify &&
bp->button_down_p)
{
@@
-1298,7
+1306,7
@@
static void
parse_color (ModeInfo *mi, const char *name, const char *s, GLfloat *a)
{
XColor c;
parse_color (ModeInfo *mi, const char *name, const char *s, GLfloat *a)
{
XColor c;
- a[
4
] = 1.0; /* alpha */
+ a[
3
] = 1.0; /* alpha */
if (! XParseColor (MI_DISPLAY(mi), MI_COLORMAP(mi), s, &c))
{
if (! XParseColor (MI_DISPLAY(mi), MI_COLORMAP(mi), s, &c))
{