From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Feb 11 02:53:36 2009 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D5DC10657FD; Wed, 11 Feb 2009 02:53:36 +0000 (UTC) (envelope-from Benjamin.Close@clearchain.com) Received: from mail.clearchain.com (63-254-233-242.ip.mcleodusa.net [63.254.233.242]) by mx1.freebsd.org (Postfix) with ESMTP id D0E668FC12; Wed, 11 Feb 2009 02:53:35 +0000 (UTC) (envelope-from Benjamin.Close@clearchain.com) Received: from [192.168.0.91] (wcl.ml.unisa.edu.au [130.220.166.5]) (authenticated bits=0) by mail.clearchain.com (8.14.3/8.14.3) with ESMTP id n1B2UlZh007455 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 11 Feb 2009 13:00:50 +1030 (CST) (envelope-from Benjamin.Close@clearchain.com) Message-ID: <49923852.60503@clearchain.com> Date: Wed, 11 Feb 2009 13:00:42 +1030 From: Benjamin Close User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090210 Shredder/3.0b2pre MIME-Version: 1.0 To: linimon@FreeBSD.org References: <200902022317.n12NHfW8050885@freefall.freebsd.org> In-Reply-To: <200902022317.n12NHfW8050885@freefall.freebsd.org> Content-Type: multipart/mixed; boundary="------------050602090207060101060009" X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on leo.clearchain.com X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (mail.clearchain.com [63.254.233.242]); Wed, 11 Feb 2009 13:00:51 +1030 (CST) Cc: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/131309: sysutils/wmbluecpu: libxcb + wmbluecpu problem? X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2009 02:53:37 -0000 This is a multi-part message in MIME format. --------------050602090207060101060009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 3/02/2009 9:47 AM, linimon@FreeBSD.org wrote: > Old Synopsis: libxcb + wmbluecpu problem? > New Synopsis: sysutils/wmbluecpu: libxcb + wmbluecpu problem? > > Responsible-Changed-From-To: freebsd-ports-bugs->benjsc > Responsible-Changed-By: linimon > Responsible-Changed-When: Mon Feb 2 23:16:45 UTC 2009 > Responsible-Changed-Why: > Fix synopsis and assign. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=131309 > Attached Patch should fix the problem and should apply cleanly to the port. The cause is libxcb expecting the SIGALRM signal which is being caught by wmbluecpu. The way the program does the event loop is just wrong. Fix it and a number of other issues (SIGTERM/SIGQUIT, etc terminal handling). --------------050602090207060101060009 Content-Type: text/plain; name="20080211-wmbluecpu.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="20080211-wmbluecpu.patch" Index: Makefile =================================================================== RCS file: /devel/FreeBSD/cvs/ports/sysutils/wmbluecpu/Makefile,v retrieving revision 1.7 diff -u -r1.7 Makefile --- Makefile 23 Mar 2008 16:43:52 -0000 1.7 +++ Makefile 11 Feb 2009 02:14:19 -0000 @@ -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 Index: files/patch-dockapp.c =================================================================== RCS file: files/patch-dockapp.c diff -N files/patch-dockapp.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-dockapp.c 11 Feb 2009 02:13:10 -0000 @@ -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); + } + } Index: files/patch-wmbluecpu.c =================================================================== RCS file: files/patch-wmbluecpu.c diff -N files/patch-wmbluecpu.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-wmbluecpu.c 11 Feb 2009 02:12:55 -0000 @@ -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; + } --------------050602090207060101060009--