From 9464330a911d09a9b7641f925c478738e0269035 Mon Sep 17 00:00:00 2001 From: jschauma Date: Mon, 5 Aug 2002 21:42:33 +0000 Subject: Add patches to implement proper iconify/resize behaviour. Patches by xOr, as posted to the blackbox mailinglist (blackbox at trolltech dot com). Bump PKGREVISION. --- misc/bbappconf/Makefile | 3 +- misc/bbappconf/distinfo | 8 +++++- misc/bbappconf/patches/patch-ba | 37 +++++++++++++++++++++++++ misc/bbappconf/patches/patch-bb | 45 ++++++++++++++++++++++++++++++ misc/bbappconf/patches/patch-bc | 17 ++++++++++++ misc/bbappconf/patches/patch-bd | 61 +++++++++++++++++++++++++++++++++++++++++ misc/bbappconf/patches/patch-be | 29 ++++++++++++++++++++ misc/bbappconf/patches/patch-bf | 13 +++++++++ 8 files changed, 211 insertions(+), 2 deletions(-) create mode 100644 misc/bbappconf/patches/patch-ba create mode 100644 misc/bbappconf/patches/patch-bb create mode 100644 misc/bbappconf/patches/patch-bc create mode 100644 misc/bbappconf/patches/patch-bd create mode 100644 misc/bbappconf/patches/patch-be create mode 100644 misc/bbappconf/patches/patch-bf (limited to 'misc/bbappconf') diff --git a/misc/bbappconf/Makefile b/misc/bbappconf/Makefile index ce343250c01..48f801458bc 100644 --- a/misc/bbappconf/Makefile +++ b/misc/bbappconf/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.1.1.1 2002/08/04 16:24:21 jschauma Exp $ +# $NetBSD: Makefile,v 1.2 2002/08/05 21:42:33 jschauma Exp $ # DISTNAME= bbappconf-0.0.1-peak3 PKGNAME= bbappconf-0.0.1.0.3 +PKGREVISION= 1 CATEGORIES= misc x11 wm MASTER_SITES= http://bbtools.windsofstorm.net/sources/devel/ diff --git a/misc/bbappconf/distinfo b/misc/bbappconf/distinfo index 10148949364..567fda62c9d 100644 --- a/misc/bbappconf/distinfo +++ b/misc/bbappconf/distinfo @@ -1,7 +1,13 @@ -$NetBSD: distinfo,v 1.1.1.1 2002/08/04 16:24:21 jschauma Exp $ +$NetBSD: distinfo,v 1.2 2002/08/05 21:42:33 jschauma Exp $ SHA1 (bbappconf-0.0.1-peak3.tar.gz) = 03698e9ec97872aa36df86c2ecd97922ef22907c Size (bbappconf-0.0.1-peak3.tar.gz) = 80193 bytes SHA1 (patch-aa) = f730864931ec633ffa54e51a42b2d6dfbb127929 SHA1 (patch-ab) = 2d45a53624945456a4ca3289ed241b21aee356c4 SHA1 (patch-ac) = efdb5217518e3814910a85ecf37c66b45bda46d8 +SHA1 (patch-ba) = b4e1b15b170ea4ba3e787313cc9dbc68456fb1aa +SHA1 (patch-bb) = fd20465664ae43a30487b547b0688e3253fb5f04 +SHA1 (patch-bc) = d47fb2abd28c7a5c0aa516e70da3c4f87554f592 +SHA1 (patch-bd) = adc0e81679f6e7fbe830b80e0efe3470c572c4bc +SHA1 (patch-be) = 732f449cf865e2e9e1a97a098ccdbb2e6c3538e1 +SHA1 (patch-bf) = a47c1f6b242fecd06ee6102f4b0a7acf07ae252e diff --git a/misc/bbappconf/patches/patch-ba b/misc/bbappconf/patches/patch-ba new file mode 100644 index 00000000000..898752f8747 --- /dev/null +++ b/misc/bbappconf/patches/patch-ba @@ -0,0 +1,37 @@ +$NetBSD: patch-ba,v 1.1 2002/08/05 21:42:34 jschauma Exp $ + +--- appconf.hh.orig Mon Aug 5 17:28:52 2002 ++++ appconf.hh Mon Aug 5 17:30:01 2002 +@@ -38,6 +38,11 @@ + bool getMaxHoriz(void) { return max_horiz;} + bool getMaxVert(void) {return max_vert;} + ++ int getPositionX(void) {return position_x;} ++ int getPositionY(void) {return position_y;} ++ int getWidth(void) {return width;} ++ int getHeight(void) {return height;} ++ + char *getName(void) { return appname;} + char *getClass(void) { return appclass;} + +@@ -47,6 +52,11 @@ + void setMaxHoriz(bool _max_horiz) {max_horiz=_max_horiz;} + void setStartOnDesktop(unsigned int _start_on_desktop) + {start_on_desktop=_start_on_desktop;} ++ void setPositionX(int _position_x) {position_x=_position_x;} ++ void setPositionY(int _position_y) {position_y=_position_y;} ++ void setWidth(int _width) {width=_width;} ++ void setHeight(int _height) {height=_height;} ++ + private: + + bool sticky; +@@ -54,6 +64,8 @@ + bool max_horiz; + bool max_vert; + unsigned int start_on_desktop; ++ int position_x, position_y; ++ int width, height; + char *appname; + char *appclass; + }; diff --git a/misc/bbappconf/patches/patch-bb b/misc/bbappconf/patches/patch-bb new file mode 100644 index 00000000000..52c241fba8a --- /dev/null +++ b/misc/bbappconf/patches/patch-bb @@ -0,0 +1,45 @@ +$NetBSD: patch-bb,v 1.1 2002/08/05 21:42:34 jschauma Exp $ + +--- bbappconf.cc.orig Mon Aug 5 16:52:13 2002 ++++ bbappconf.cc Mon Aug 5 16:56:41 2002 +@@ -35,6 +35,8 @@ + + config_db = XrmGetFileDatabase("config.bb"); + ++ iconic = options->iconic; ++ + desktop_nr=0; + current_desktop_nr=-1; + wm_init=False; +@@ -245,6 +247,18 @@ + getWMInterface()->sendWindowToDesktop(*win, + resource->getAppConf(i)->getStartOnDesktop()-1); + } ++ ++ /* set window size */ ++ if (resource->getAppConf(i)->getWidth()>=0 && ++ resource->getAppConf(i)->getHeight()>=0) { ++ getWMInterface()->resizeWindow(*win,resource->getAppConf(i)->getWidth(),resource->getAppConf(i)->getHeight()); ++ } ++ /* set window position */ ++ if (resource->getAppConf(i)->getPositionX()!=-1111 && ++ resource->getAppConf(i)->getPositionY()!=-1111) { ++ getWMInterface()->moveWindow(*win,resource->getAppConf(i)->getPositionX(),resource->getAppConf(i)->getPositionY()); ++ } ++ + if (resource->getAppConf(i)->getMaxHoriz() || + resource->getAppConf(i)->getMaxVert()) { + if (XGetWindowProperty(getXDisplay(), *win, +@@ -413,12 +427,6 @@ + XSetWindowBackgroundPixmap(getXDisplay(), framewin, pixmap.frame); + } + +- if (!withdrawn && resource->report.auto_raise) { +- XRaiseWindow(getXDisplay(),framewin); +- lower=False; +- } +- else lower=True; +- + if (!reconfigure) { + + // gcv.font = resource->menu.font->fid; diff --git a/misc/bbappconf/patches/patch-bc b/misc/bbappconf/patches/patch-bc new file mode 100644 index 00000000000..2f85d741421 --- /dev/null +++ b/misc/bbappconf/patches/patch-bc @@ -0,0 +1,17 @@ +$NetBSD: patch-bc,v 1.1 2002/08/05 21:42:34 jschauma Exp $ + +--- bbappconf.hh.orig Mon Aug 5 16:57:10 2002 ++++ bbappconf.hh Mon Aug 5 17:01:50 2002 +@@ -97,10 +97,11 @@ + + private: + +- bool lower; + bool wm_init; + int day,month,year; + int number_of_icons; ++ ++ bool iconic; + + int current_desktop_nr; + PIXMAP pixmap; diff --git a/misc/bbappconf/patches/patch-bd b/misc/bbappconf/patches/patch-bd new file mode 100644 index 00000000000..d2d2c010e97 --- /dev/null +++ b/misc/bbappconf/patches/patch-bd @@ -0,0 +1,61 @@ +$NetBSD: patch-bd,v 1.1 2002/08/05 21:42:34 jschauma Exp $ + +--- resource.cc.orig Mon Aug 5 17:02:17 2002 ++++ resource.cc Mon Aug 5 17:04:39 2002 +@@ -61,6 +61,8 @@ + int i; + char rclass[40]; + char rname[40]; ++ int position_x, position_y; ++ int width, height; + + if ((XrmGetResource(resource_db, "bbappconf.numberOf.configs", + "Bbappconf.NumberOf.Configs", +@@ -164,6 +166,47 @@ + app_conf[i].setMaxHoriz(false); + } + ++ sprintf(rclass, "Bbappconf.%d.Width",i+1); ++ sprintf(rname, "bbappconf.%d.width",i+1); ++ if ((XrmGetResource(resource_db, rname,rclass,&value_type, &value))) { ++ if (sscanf(value.addr, "%u", &width) != 1) { ++ width = -1; ++ } ++ } else ++ width=-1; ++ app_conf[i].setWidth(width); ++ ++ sprintf(rclass, "Bbappconf.%d.Height",i+1); ++ sprintf(rname, "bbappconf.%d.height",i+1); ++ if ((XrmGetResource(resource_db, rname,rclass,&value_type, &value))) { ++ if (sscanf(value.addr, "%u", &height) != 1) { ++ height = -1; ++ } ++ } else ++ height=-1; ++ app_conf[i].setHeight(height); ++ ++ sprintf(rclass, "Bbappconf.%d.PositionX",i+1); ++ sprintf(rname, "bbappconf.%d.positionX",i+1); ++ if ((XrmGetResource(resource_db, rname,rclass, ++ &value_type, &value))) { ++ if (sscanf(value.addr, "%u", &position_x) != 1) { ++ position_x = -1111; ++ } ++ } else ++ position_x=-1111; ++ app_conf[i].setPositionX(position_x); ++ ++ sprintf(rclass, "Bbappconf.%d.PositionY",i+1); ++ sprintf(rname, "bbappconf.%d.positionY",i+1); ++ if ((XrmGetResource(resource_db, rname,rclass, ++ &value_type, &value))) { ++ if (sscanf(value.addr, "%u", &position_y) != 1) { ++ position_y = -1111; ++ } ++ } else ++ position_y=-1111; ++ app_conf[i].setPositionY(position_y); + + } + } diff --git a/misc/bbappconf/patches/patch-be b/misc/bbappconf/patches/patch-be new file mode 100644 index 00000000000..592a5c0b5f0 --- /dev/null +++ b/misc/bbappconf/patches/patch-be @@ -0,0 +1,29 @@ +$NetBSD: patch-be,v 1.1 2002/08/05 21:42:34 jschauma Exp $ + +--- wminterface.cc.orig Mon Aug 5 17:05:01 2002 ++++ wminterface.cc Mon Aug 5 17:06:15 2002 +@@ -285,9 +285,9 @@ + + void WMInterface::NETNotifyStartup() { + bbtool->setNETInit(); //wm_init=True; +- XClearWindow(bbtool->getXDisplay(), bbtool->framewin); ++/* XClearWindow(bbtool->getXDisplay(), bbtool->framewin); + XMapWindow(bbtool->getXDisplay(), bbtool->framewin); +- XMapSubwindows(bbtool->getXDisplay(), bbtool->framewin); ++ XMapSubwindows(bbtool->getXDisplay(), bbtool->framewin); */ + } + + void WMInterface::NETNotifyWindowAdd(Window win,int desktop_nr) { +@@ -415,3 +415,12 @@ + } else if (number_of_desktopsremoveDesktopWindow();*/ + } ++ ++void WMInterface::moveWindow(Window win, int x, int y) { ++ XMoveWindow(bbtool->getXDisplay(), win, x, y); ++} ++ ++void WMInterface::resizeWindow(Window win, int width, int height) { ++ XResizeWindow(bbtool->getXDisplay(), win, width, height); ++} ++ diff --git a/misc/bbappconf/patches/patch-bf b/misc/bbappconf/patches/patch-bf new file mode 100644 index 00000000000..7cbfada850e --- /dev/null +++ b/misc/bbappconf/patches/patch-bf @@ -0,0 +1,13 @@ +$NetBSD: patch-bf,v 1.1 2002/08/05 21:42:34 jschauma Exp $ + +--- wminterface.hh.orig Mon Aug 5 17:06:39 2002 ++++ wminterface.hh Mon Aug 5 17:07:13 2002 +@@ -53,6 +53,8 @@ + int getAttributes(Window); + void changeIconState(Window); + void windowAttributeChange(Window); ++ void moveWindow(Window,int,int); ++ void resizeWindow(Window,int,int); + + int getNumberOfDesktops(); + int getCurrentDesktop(); -- cgit v1.2.3