]> git.pld-linux.org Git - packages/WindowMaker.git/blame - WindowMaker-singleclick.patch
- more fixes for building shared libraries.
[packages/WindowMaker.git] / WindowMaker-singleclick.patch
CommitLineData
cceea408 1diff -Naur WindowMaker-0.63.1/src/WindowMaker.h WindowMaker-0.63.1-p/src/WindowMaker.h
260b62b4 2--- WindowMaker-0.63.1/src/WindowMaker.h Fri Nov 17 03:10:32 2000
cceea408 3+++ WindowMaker-0.63.1-p/src/WindowMaker.h Mon Jan 8 12:15:41 2001
260b62b4 4@@ -424,6 +424,9 @@
149d7ea9 5 /* shading animation */
dab91712 6 signed char shade_speed;
149d7ea9
JR
7
8+ /* single click to lauch applications */
9+ char single_click;
10+
11 int edge_resistance;
5a1d6215 12 char attract;
149d7ea9 13
cceea408 14diff -Naur WindowMaker-0.63.1/src/appicon.c WindowMaker-0.63.1-p/src/appicon.c
260b62b4 15--- WindowMaker-0.63.1/src/appicon.c Wed Nov 1 16:40:16 2000
cceea408 16+++ WindowMaker-0.63.1-p/src/appicon.c Mon Jan 8 12:15:41 2001
dab91712 17@@ -717,6 +717,7 @@
149d7ea9
JR
18 int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
19 int ix, iy;
20 int clickButton = event->xbutton.button;
21+ Bool hasMoved;
22 Pixmap ghost = None;
23 Window wins[2];
24
dab91712 25@@ -786,6 +787,7 @@
149d7ea9
JR
26 XClearWindow(dpy, scr->dock_shadow);
27 }
28
29+ hasMoved = False;
30 while (!done) {
31 WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
32 |ButtonMotionMask|ExposureMask, &ev);
dab91712 33@@ -795,6 +797,7 @@
149d7ea9
JR
34 break;
35
36 case MotionNotify:
37+ hasMoved = True;
38 if (!grabbed) {
39 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
40 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
dab91712 41@@ -925,6 +928,9 @@
149d7ea9
JR
42 wArrangeIcons(scr, True);
43
44 done = 1;
45+ if (!hasMoved && wPreferences.single_click) {
46+ iconDblClick(desc, event);
47+ }
48 break;
49 }
50 }
cceea408 51diff -Naur WindowMaker-0.63.1/src/defaults.c WindowMaker-0.63.1-p/src/defaults.c
260b62b4 52--- WindowMaker-0.63.1/src/defaults.c Sat Jan 6 22:28:02 2001
cceea408 53+++ WindowMaker-0.63.1-p/src/defaults.c Mon Jan 8 12:15:41 2001
260b62b4 54@@ -547,6 +547,9 @@
149d7ea9
JR
55 {"DisableBlinking", "NO", NULL,
56 &wPreferences.dont_blink, getBool, NULL
57 },
dab91712 58+ {"SingleClickLaunch", "NO", NULL,
149d7ea9 59+ &wPreferences.single_click, getBool, NULL
dab91712 60+ },
61 /* style options */
62 {"MenuStyle", "normal", seMenuStyles,
63 &wPreferences.menu_style, getEnum, setMenuStyle
cceea408 64diff -Naur WindowMaker-0.63.1/src/dock.c WindowMaker-0.63.1-p/src/dock.c
260b62b4 65--- WindowMaker-0.63.1/src/dock.c Wed Nov 1 16:40:16 2000
cceea408 66+++ WindowMaker-0.63.1-p/src/dock.c Mon Jan 8 12:15:41 2001
260b62b4 67@@ -3752,7 +3752,7 @@
149d7ea9
JR
68
69
70
71-static void
72+static int
73 handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
74 {
75 WScreen *scr = dock->screen_ptr;
260b62b4 76@@ -3767,11 +3767,12 @@
149d7ea9
JR
77 int ix = aicon->xindex, iy = aicon->yindex;
78 int tmp;
79 Pixmap ghost = None;
80- Bool docked;
81+ Bool docked, hasMoved;
82 int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
83 int omnipresent = aicon->omnipresent; /* this must be cached!!! */
84
85
86+ hasMoved = False;
87 if (wPreferences.flags.noupdates)
88 return;
89
260b62b4 90@@ -3822,6 +3823,7 @@
149d7ea9
JR
91 break;
92
93 case MotionNotify:
94+ hasMoved = True;
95 if (!grabbed) {
96 if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
97 || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
260b62b4 98@@ -3977,7 +3979,10 @@
149d7ea9
JR
99 #ifdef DEBUG
100 puts("End icon move");
101 #endif
102- return;
103+ if (!hasMoved) {
104+ return 1;
105+ }
106+ return 0;
107 }
108 }
109 }
260b62b4 110@@ -4117,7 +4122,9 @@
149d7ea9
JR
111 else
112 handleDockMove(dock, aicon, event);
113 } else
114- handleIconMove(dock, aicon, event);
115+ if (handleIconMove(dock, aicon, event) != 0 &&
116+ wPreferences.single_click)
117+ iconDblClick(desc, event);
118
119 } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
120 aicon==scr->clip_icon) {
cceea408 121diff -Naur WindowMaker-0.63.1/src/icon.c WindowMaker-0.63.1-p/src/icon.c
260b62b4 122--- WindowMaker-0.63.1/src/icon.c Sat Jan 6 22:28:02 2001
cceea408 123+++ WindowMaker-0.63.1-p/src/icon.c Mon Jan 8 12:15:41 2001
dab91712 124@@ -874,6 +874,7 @@
149d7ea9
JR
125 int dx=event->xbutton.x, dy=event->xbutton.y;
126 int grabbed=0;
127 int clickButton=event->xbutton.button;
128+ Bool hasMoved;
129
130 if (WCHECK_STATE(WSTATE_MODAL))
131 return;
dab91712 132@@ -916,6 +917,7 @@
149d7ea9
JR
133 wwarning("pointer grab failed for icon move");
134 #endif
135 }
136+ hasMoved = False;
137 while(1) {
138 WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
139 |ButtonMotionMask|ExposureMask, &ev);
dab91712 140@@ -925,6 +927,7 @@
149d7ea9
JR
141 break;
142
143 case MotionNotify:
144+ hasMoved = True;
145 if (!grabbed) {
146 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
147 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
dab91712 148@@ -962,6 +965,9 @@
149d7ea9
JR
149
150 if (wPreferences.auto_arrange_icons)
151 wArrangeIcons(wwin->screen_ptr, True);
152+ if (!hasMoved && wPreferences.single_click) {
153+ miniwindowDblClick(desc, event);
154+ }
155 return;
156
157 }
This page took 0.08609 seconds and 4 git commands to generate.