1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

- Update to 0.3.3

- Add patches to use gettimeofday(2) so it will not have to link with libcompat

PR:		39568
Submitted by:	maintainer
This commit is contained in:
Patrick Li 2002-06-21 05:46:46 +00:00
parent ce49d1fa84
commit c5c4353d31
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=61665
4 changed files with 83 additions and 3 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= waimea
PORTVERSION= 0.3.2
PORTVERSION= 0.3.3
CATEGORIES= x11-wm
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= waimea
@ -18,7 +18,6 @@ USE_IMLIB= yes
USE_X_PREFIX= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV+= LIBS="-lcompat"
MAN1= waimea.1

View File

@ -1 +1 @@
MD5 (waimea-0.3.2.tar.gz) = 97ab7c52590aac56a3acebdf2f8bf1fa
MD5 (waimea-0.3.3.tar.gz) = 64c2b9009ead3b95f78a2365bad94cec

View File

@ -0,0 +1,61 @@
--- src/EventHandler.cc.orig Mon Jun 17 19:14:12 2002
+++ src/EventHandler.cc Mon Jun 17 19:38:20 2002
@@ -94,7 +94,7 @@
void EventHandler::HandleEvent(XEvent *event) {
Window w;
int i, rx, ry;
- struct timeb click_time;
+ struct timeval click_time;
EventDetail *ed = new EventDetail;
@@ -136,36 +136,36 @@
case ButtonPress:
ed->type = ButtonPress;
if (last_click_win == event->xbutton.window) {
- ftime(&click_time);
- if (click_time.time <= last_click.time + 1) {
- if (click_time.time == last_click.time &&
+ gettimeofday(&click_time, NULL);
+ if (click_time.tv_sec <= last_click.tv_sec + 1) {
+ if (click_time.tv_sec == last_click.tv_sec &&
(unsigned int)
- (click_time.millitm - last_click.millitm) <
- waimea->rh->double_click) {
+ (click_time.tv_usec - last_click.tv_usec)
+ / 1000 < waimea->rh->double_click) {
ed->type = DoubleClick;
last_click_win = (Window) 0;
}
- else if ((1000 - last_click.millitm) +
- (unsigned int) click_time.millitm <
- waimea->rh->double_click) {
+ else if (((1000000 - last_click.tv_usec) +
+ (unsigned int) click_time.tv_usec)
+ / 1000 < waimea->rh->double_click) {
ed->type = DoubleClick;
last_click_win = (Window) 0;
}
else {
last_click_win = event->xbutton.window;
- last_click.time = click_time.time;
- last_click.millitm = click_time.millitm;
+ last_click.tv_sec = click_time.tv_sec;
+ last_click.tv_usec = click_time.tv_usec;
}
}
else {
last_click_win = event->xbutton.window;
- last_click.time = click_time.time;
- last_click.millitm = click_time.millitm;
+ last_click.tv_sec = click_time.tv_sec;
+ last_click.tv_usec = click_time.tv_usec;
}
}
else {
last_click_win = event->xbutton.window;
- ftime(&last_click);
+ gettimeofday(&last_click, NULL);
}
case ButtonRelease:
if (event->type == ButtonRelease) ed->type = ButtonRelease;

View File

@ -0,0 +1,20 @@
--- src/EventHandler.hh.orig Mon Jun 17 19:17:21 2002
+++ src/EventHandler.hh Mon Jun 17 19:21:08 2002
@@ -15,7 +15,7 @@
#define __EventHandler_hh
#include <sys/types.h>
-#include <sys/timeb.h>
+#include <sys/time.h>
#include <X11/Xlib.h>
#include <hash_set.h>
@@ -64,7 +64,7 @@
Waimea *waimea;
ResourceHandler *rh;
Window last_click_win;
- struct timeb last_click;
+ struct timeval last_click;
};
Bool eventmatch(WaAction *, EventDetail *);