diff options
author | Max Brazhnikov <makc@FreeBSD.org> | 2009-04-20 19:18:38 +0000 |
---|---|---|
committer | Max Brazhnikov <makc@FreeBSD.org> | 2009-04-20 19:18:38 +0000 |
commit | cc470976104282334eee8480f84dc4aeb8ac91d7 (patch) | |
tree | 8c13224dac90a685b171becb71438589283b9232 /sysutils/wmbluecpu | |
parent | 299bf0206f1256827cd59ccb6170b84e70d1c414 (diff) | |
download | ports-cc470976104282334eee8480f84dc4aeb8ac91d7.tar.gz ports-cc470976104282334eee8480f84dc4aeb8ac91d7.zip |
Notes
Diffstat (limited to 'sysutils/wmbluecpu')
-rw-r--r-- | sysutils/wmbluecpu/Makefile | 2 | ||||
-rw-r--r-- | sysutils/wmbluecpu/files/patch-dockapp.c | 107 | ||||
-rw-r--r-- | sysutils/wmbluecpu/files/patch-wmbluecpu.c | 17 |
3 files changed, 125 insertions, 1 deletions
diff --git a/sysutils/wmbluecpu/Makefile b/sysutils/wmbluecpu/Makefile index 29785eed033d..932c2c95694f 100644 --- a/sysutils/wmbluecpu/Makefile +++ b/sysutils/wmbluecpu/Makefile @@ -7,7 +7,7 @@ PORTNAME= wmbluecpu PORTVERSION= 0.4 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= sysutils windowmaker MASTER_SITES= ${MASTER_SITE_SUNSITE} MASTER_SITE_SUBDIR= X11/xutils diff --git a/sysutils/wmbluecpu/files/patch-dockapp.c b/sysutils/wmbluecpu/files/patch-dockapp.c new file mode 100644 index 000000000000..98f58c328ff9 --- /dev/null +++ b/sysutils/wmbluecpu/files/patch-dockapp.c @@ -0,0 +1,107 @@ +--- dockapp.c 2003-03-23 05:10:15.000000000 +1030 ++++ dockapp.c 2009-02-11 12:34:18.897651000 +1030 +@@ -238,9 +238,9 @@ + 32, PropModeReplace, (unsigned char *)&mwmhints, 5); + } + XMapWindow(display, mapwindow); +- signal(SIGINT, handle_signal); +- signal(SIGQUIT, handle_signal); +- signal(SIGTERM, handle_signal); ++ //signal(SIGINT, handle_signal); ++ //signal(SIGQUIT, handle_signal); ++ //signal(SIGTERM, handle_signal); + } + + void update_window() +@@ -253,42 +253,55 @@ + { + XEvent event; + int winx, winy; ++ fd_set fdset; ++ struct timeval timeout; + +- XNextEvent(display, &event); +- switch(event.type) +- { +- case Expose: +- update_window(); +- break; +- case ButtonPress: +- if(opt_window && (event.xbutton.button == 1)) +- { +- XDefineCursor(display, mapwindow, fleur); +- moving = 1; +- oldx = event.xbutton.x; +- oldy = event.xbutton.y; +- } +- break; +- case MotionNotify: +- winx = event.xmotion.x_root - oldx; +- winy = event.xmotion.y_root - oldy; +- if(winx < 0) winx = 0; +- if(winy < 0) winy = 0; +- if(winx > (screenwidth - WINDOW_WIDTH)) winx = screenwidth - WINDOW_WIDTH; +- if(winy > (screenheight - WINDOW_HEIGHT)) winy = screenheight - WINDOW_HEIGHT; +- if(moving) +- XMoveWindow(display, mapwindow, winx, winy); +- break; +- case ButtonRelease: +- if(opt_window) +- { +- moving = 0; +- XUndefineCursor(display, mapwindow); +- } +- break; +- case ClientMessage: +- if(event.xclient.data.l[0] == wm_delete_window) +- exitloop = 1; +- break; ++ FD_ZERO(&fdset); ++ FD_SET(ConnectionNumber(display), &fdset); ++ timeout.tv_usec = opt_timer_miliseconds % 1000; ++ timeout.tv_sec = opt_timer_miliseconds/1000; ++ ++ if( select(ConnectionNumber(display)+1, &fdset, NULL, NULL, &timeout) > 0 ){ ++ while( XPending( display )){ ++ XNextEvent(display, &event); ++ switch(event.type) ++ { ++ case Expose: ++ update_window(); ++ break; ++ case ButtonPress: ++ if(opt_window && (event.xbutton.button == 1)) ++ { ++ XDefineCursor(display, mapwindow, fleur); ++ moving = 1; ++ oldx = event.xbutton.x; ++ oldy = event.xbutton.y; ++ } ++ break; ++ case MotionNotify: ++ winx = event.xmotion.x_root - oldx; ++ winy = event.xmotion.y_root - oldy; ++ if(winx < 0) winx = 0; ++ if(winy < 0) winy = 0; ++ if(winx > (screenwidth - WINDOW_WIDTH)) winx = screenwidth - WINDOW_WIDTH; ++ if(winy > (screenheight - WINDOW_HEIGHT)) winy = screenheight - WINDOW_HEIGHT; ++ if(moving) ++ XMoveWindow(display, mapwindow, winx, winy); ++ break; ++ case ButtonRelease: ++ if(opt_window) ++ { ++ moving = 0; ++ XUndefineCursor(display, mapwindow); ++ } ++ break; ++ case ClientMessage: ++ if(event.xclient.data.l[0] == wm_delete_window) ++ exitloop = 1; ++ break; ++ } ++ } ++ } else { ++ handle_timer(SIGALRM); + } + } diff --git a/sysutils/wmbluecpu/files/patch-wmbluecpu.c b/sysutils/wmbluecpu/files/patch-wmbluecpu.c new file mode 100644 index 000000000000..d308aecaa950 --- /dev/null +++ b/sysutils/wmbluecpu/files/patch-wmbluecpu.c @@ -0,0 +1,17 @@ +--- wmbluecpu.c 2003-03-17 12:02:13.000000000 +1030 ++++ wmbluecpu.c 2009-02-11 12:35:43.966803000 +1030 +@@ -32,12 +32,12 @@ + argv = varg; + parse_arguments(); + make_window(); +- start_timer(); ++ cpu_init(); ++ handle_timer(14); + while(!exitloop) + { + process_events(); + } +- stop_timer(); + free_stuff(); + return 0; + } |