From owner-freebsd-ports Sat Jul 27 11: 0:29 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1EDA137B400 for ; Sat, 27 Jul 2002 11:00:06 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D75043E67 for ; Sat, 27 Jul 2002 11:00:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6RI05JU093734 for ; Sat, 27 Jul 2002 11:00:05 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6RI05tp093733; Sat, 27 Jul 2002 11:00:05 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB18C37B400 for ; Sat, 27 Jul 2002 10:55:55 -0700 (PDT) Received: from wrath.cs.utah.edu (wrath.cs.utah.edu [155.99.198.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 140D743E3B for ; Sat, 27 Jul 2002 10:55:55 -0700 (PDT) (envelope-from ricci@cs.utah.edu) Received: from slow.cs.utah.edu (slow.cs.utah.edu [155.99.212.4]) by wrath.cs.utah.edu (8.11.6/8.11.6) with ESMTP id g6RHtsD05553 for ; Sat, 27 Jul 2002 11:55:54 -0600 (MDT) Received: from slow.cs.utah.edu (localhost [127.0.0.1]) by slow.cs.utah.edu (8.12.3/8.12.3) with ESMTP id g6RHtr6T061611 for ; Sat, 27 Jul 2002 11:55:53 -0600 (MDT) (envelope-from ricci@slow.cs.utah.edu) Received: (from ricci@localhost) by slow.cs.utah.edu (8.12.3/8.12.3/Submit) id g6RHtrhu061610; Sat, 27 Jul 2002 11:55:53 -0600 (MDT) Message-Id: <200207271755.g6RHtrhu061610@slow.cs.utah.edu> Date: Sat, 27 Jul 2002 11:55:53 -0600 (MDT) From: Robert P Ricci Reply-To: Robert P Ricci To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/41056: Apply -pedantic fix and user-smubmitted patches to x11-wm/ion Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 41056 >Category: ports >Synopsis: Apply -pedantic fix and user-smubmitted patches to x11-wm/ion >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sat Jul 27 11:00:04 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Robert P Ricci >Release: FreeBSD 4.6-STABLE i386 >Organization: University of Utah Flux Group >Environment: System: FreeBSD hactar.xrob.org 4.6-STABLE FreeBSD 4.6-STABLE #17: Wed Jul 24 17:49:04 MDT 2002 root@hactar.xrob.org:/usr/obj/usr/src/sys/HACTAR i386 >Description: Build for this port is broken, due to problems reported in PR standards/40402 . One of the submitted patches removes '-pedantic-errors' from the compiler flags, so that the port will build again. Also, a few user-submitted patches are included, as requested by a user of the port. New files: files/patch-system.mk-no_pedantic files/patch-disable_border files/patch-winprop_frame Patch relative to /usr/ports/x11-wm is included in the Fix section. >How-To-Repeat: >Fix: diff -ruN ion.old/files/patch-disable_border ion/files/patch-disable_border --- ion.old/files/patch-disable_border Wed Dec 31 17:00:00 1969 +++ ion/files/patch-disable_border Sat Jul 27 10:32:25 2002 @@ -0,0 +1,162 @@ +# This patch was originally sent to the ION mailing list by: +# Christian Mauduit + +diff -r -u doc.orig/functions.txt doc/functions.txt +--- doc.orig/functions.txt Fri Feb 8 22:23:17 2002 ++++ doc/functions.txt Fri Mar 8 23:57:46 2002 +@@ -59,6 +59,13 @@ + enabled + + ++Border control ++-------------- ++ ++disable_border Disables the border and the bar ++enable_border Enables the border and the bar ++ ++ + Close and destroy + ----------------- + +diff -r -u src.orig/draw.c src/draw.c +--- src.orig/draw.c Fri Feb 8 22:23:17 2002 ++++ src/draw.c Fri Mar 8 23:53:34 2002 +@@ -136,6 +136,13 @@ + DrawInfo _dinfo, *dinfo=&_dinfo; + WGRData *grdata=GRDATA_OF(frame); + ++ if(complete) ++ XClearWindow(wglobal.dpy, FRAME_WIN(frame)); ++ ++ /* if the border is not active, we draw nothing here */ ++ if (frame->flags & WFRAME_NO_BORDER) ++ return; ++ + dinfo->win=FRAME_WIN(frame); + dinfo->grdata=grdata; + dinfo->gc=grdata->gc; +@@ -143,15 +150,12 @@ + dinfo->geom.w+=FRAME_W(frame); + dinfo->geom.h+=FRAME_H(frame); + dinfo->border=&(grdata->frame_border); +- ++ + if(IS_ACTIVE_FRAME(frame)) + dinfo->colors=&(grdata->act_frame_colors); + else + dinfo->colors=&(grdata->frame_colors); + +- if(complete) +- XClearWindow(wglobal.dpy, FRAME_WIN(frame)); +- + /*#if 1*/ + draw_box(dinfo, FALSE); + /*#else +@@ -191,6 +195,10 @@ + WGRData *grdata=&(scr->grdata); + WRectangle bg; + ++ /* if the border is not active, we draw nothing here */ ++ if (frame->flags & WFRAME_NO_BORDER) ++ return; ++ + frame_bar_geom(frame, &bg); + + dinfo->win=FRAME_WIN(frame); +diff -r -u src.orig/frame.c src/frame.c +--- src.orig/frame.c Fri Feb 8 22:23:17 2002 ++++ src/frame.c Fri Mar 8 23:53:37 2002 +@@ -41,15 +41,28 @@ + #define BAR_W(FRAME, GRDATA) ((FRAME)->win.geom.w+(GRDATA)->bar_off.w) + #define BAR_H(FRAME, GRDATA) ((GRDATA)->bar_h) + +-#define FRAME_TO_CLIENT_W(W, GRDATA) ((W)+(GRDATA)->client_off.w) +-#define FRAME_TO_CLIENT_H(H, GRDATA) ((H)+(GRDATA)->client_off.h) +-#define CLIENT_TO_FRAME_W(W, GRDATA) ((W)-(GRDATA)->client_off.w) +-#define CLIENT_TO_FRAME_H(H, GRDATA) ((H)-(GRDATA)->client_off.h) +- +-#define CLIENT_X(FRAME, GRDATA) ((GRDATA)->client_off.x) +-#define CLIENT_Y(FRAME, GRDATA) ((GRDATA)->client_off.y) +-#define CLIENT_W(FRAME, GRDATA) FRAME_TO_CLIENT_W(FRAME_W(FRAME), GRDATA) +-#define CLIENT_H(FRAME, GRDATA) FRAME_TO_CLIENT_H(FRAME_H(FRAME), GRDATA) ++#define FRAME_TO_CLIENT_W(W, FRAME, GRDATA) \ ++ (((FRAME)->flags & WFRAME_NO_BORDER) ? \ ++ (W) : (W)+(GRDATA)->client_off.w) ++#define FRAME_TO_CLIENT_H(H, FRAME, GRDATA) \ ++ (((FRAME)->flags & WFRAME_NO_BORDER) ? \ ++ (H) : (H)+(GRDATA)->client_off.h) ++#define CLIENT_TO_FRAME_W(W, FRAME, GRDATA) \ ++ (((FRAME)->flags & WFRAME_NO_BORDER) ? \ ++ (W) : (W)-(GRDATA)->client_off.w) ++#define CLIENT_TO_FRAME_H(H, FRAME, GRDATA) \ ++ (((FRAME)->flags & WFRAME_NO_BORDER) ? \ ++ (H) : (H)-(GRDATA)->client_off.h) ++ ++#define CLIENT_X(FRAME, GRDATA) \ ++ ((FRAME)->flags & WFRAME_NO_BORDER ? \ ++ 0 : (GRDATA)->client_off.x) ++#define CLIENT_Y(FRAME, GRDATA) \ ++ ((FRAME)->flags & WFRAME_NO_BORDER ? \ ++ 0 : (GRDATA)->client_off.y) ++ ++#define CLIENT_W(FRAME, GRDATA) FRAME_TO_CLIENT_W(FRAME_W(FRAME), FRAME, GRDATA) ++#define CLIENT_H(FRAME, GRDATA) FRAME_TO_CLIENT_H(FRAME_H(FRAME), FRAME, GRDATA) + + + WThingFuntab frame_funtab={deinit_frame, frame_remove_child}; +@@ -658,6 +671,22 @@ + geom->y=CLIENT_Y(frame, grdata); + geom->w=CLIENT_W(frame, grdata); + geom->h=CLIENT_H(frame, grdata); ++} ++ ++void enable_border(WFrame *frame) ++{ ++ frame->flags = frame->flags & (~WFRAME_NO_BORDER); ++ ++ frame_fit_clients(frame); ++ draw_frame(frame,TRUE); ++} ++ ++void disable_border(WFrame *frame) ++{ ++ frame->flags = frame->flags | WFRAME_NO_BORDER; ++ ++ frame_fit_clients(frame); ++ draw_frame(frame,TRUE); + } + + +diff -r -u src.orig/frame.h src/frame.h +--- src.orig/frame.h Fri Feb 8 22:23:17 2002 ++++ src/frame.h Fri Mar 8 23:05:54 2002 +@@ -23,6 +23,7 @@ + #define WFRAME_SHADE 0x0004 + #define WFRAME_NO_BAR 0x0008 + #define WFRAME_MAX_BOTH (WFRAME_MAX_VERT|WFRAME_MAX_HORIZ) ++#define WFRAME_NO_BORDER 0x0010 + + #define FRAME_SHORTCUT_W 23 + +@@ -96,5 +97,8 @@ + extern void split_top(WWorkspace *ws, char *str); + + extern WFrame *find_frame_of(Window win); ++ ++extern void enable_border(WFrame *frame); ++extern void disable_border(WFrame *frame); + + #endif /* INCLUDED_FRAME_H */ +diff -r -u src.orig/function.c src/function.c +--- src.orig/function.c Fri Feb 8 22:23:17 2002 ++++ src/function.c Fri Mar 8 23:05:54 2002 +@@ -90,6 +90,9 @@ + FN(d, generic, WFrame, "set_widthq", set_widthq), + FN(d, generic, WFrame, "set_heightq", set_heightq), + ++ FN_VOID(generic, WFrame, "enable_border", enable_border), ++ FN_VOID(generic, WFrame, "disable_border", disable_border), ++ + FN(s, generic, WWorkspace,"split_top", split_top), + + /* client */ diff -ruN ion.old/files/patch-system.mk-no_pedantic ion/files/patch-system.mk-no_pedantic --- ion.old/files/patch-system.mk-no_pedantic Wed Dec 31 17:00:00 1969 +++ ion/files/patch-system.mk-no_pedantic Sat Jul 27 11:32:06 2002 @@ -0,0 +1,19 @@ +*** system.mk.orig Sat Jul 27 11:06:16 2002 +--- system.mk Sat Jul 27 11:06:25 2002 +*************** +*** 83,89 **** + # have unused variables. + WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \ + -Wtrigraphs -Wformat -Wchar-subscripts \ +! -Wparentheses -pedantic-errors -Wuninitialized + + + CFLAGS+= $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) -D_ANSI_SOURCE +--- 83,89 ---- + # have unused variables. + WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \ + -Wtrigraphs -Wformat -Wchar-subscripts \ +! -Wparentheses -Wuninitialized + + + CFLAGS+= $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) -D_ANSI_SOURCE diff -ruN ion.old/files/patch-winprop_frame ion/files/patch-winprop_frame --- ion.old/files/patch-winprop_frame Wed Dec 31 17:00:00 1969 +++ ion/files/patch-winprop_frame Sat Jul 27 10:34:45 2002 @@ -0,0 +1,74 @@ +# This patch was originally sent to the ION mailing list by: +# Alejandro Forero Cuervo + +diff -Naur ChangeLog.orig ChangeLog +--- ChangeLog.orig Tue Feb 5 23:46:01 2002 ++++ ChangeLog Sat Feb 9 17:19:06 2002 +@@ -1,3 +1,6 @@ ++2002-02-09: ++ * Implemented "frame" functionality for winprops (Alejandro Forero ++ ). + + 2002-02-06: + * Added 'split_top "dir"' command. +diff -Naur src.orig/clientwin.c src/clientwin.c +--- src.orig/clientwin.c Wed Feb 6 18:41:22 2002 ++++ src/clientwin.c Sat Feb 9 17:09:22 2002 +@@ -180,7 +180,10 @@ + } + } + +- get_integer_property(win, wglobal.atom_frame_id, &frame_id); ++ if (props!=NULL && props->frame!=0) ++ frame_id=props->frame; ++ else ++ get_integer_property(win, wglobal.atom_frame_id, &frame_id); + + /* Get client to place this window in */ + if(client==NULL){ +diff -Naur src.orig/readconfig.c src/readconfig.c +--- src.orig/readconfig.c Wed Feb 6 18:38:16 2002 ++++ src/readconfig.c Sat Feb 9 17:24:01 2002 +@@ -674,6 +674,14 @@ + return TRUE; + } + ++ ++static bool opt_winprop_frame(Tokenizer *tokz, int n, Token *toks) ++{ ++ tmp_winprop->frame=TOK_LONG_VAL(&(toks[1])); ++ return TRUE; ++} ++ ++ + static bool opt_winprop_transient_mode(Tokenizer *tokz, int n, Token *toks) + { + char *mod=TOK_IDENT_VAL(&(toks[1])); +@@ -721,6 +729,7 @@ + tmp_winprop->data=wclass=TOK_TAKE_STRING_VAL(&(toks[1])); + tmp_winprop->switchto=-1; + tmp_winprop->stubborn=0; ++ tmp_winprop->frame=0; + tmp_winprop->transient_mode=TRANSIENT_MODE_NORMAL; + + winstance=strchr(wclass, '.'); +@@ -799,6 +808,7 @@ + {"switchto", "b", opt_winprop_switchto, NULL}, + {"stubborn", "b", opt_winprop_stubborn, NULL}, + {"transient_mode", "i", opt_winprop_transient_mode, NULL}, ++ {"frame", "l", opt_winprop_frame, NULL}, + + {"#end", NULL, end_winprop, NULL}, + /*{"#cancel", NULL, cancel_winprop, NULL},*/ +diff -Naur src.orig/winprops.h src/winprops.h +--- src.orig/winprops.h Mon Mar 5 16:16:06 2001 ++++ src/winprops.h Sat Feb 9 17:09:22 2002 +@@ -30,6 +30,7 @@ + int transient_mode; + int max_w, max_h; + int aspect_w, aspect_h; ++ int frame; + + WWinProp *next, *prev; + }; + >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message