[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright/src/wmarmon wmarmon.c
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright/src/wmarmon wmarmon.c |
Date: |
Mon, 04 Jul 2005 14:58:18 -0400 |
CVSROOT: /cvsroot/antiright
Module name: antiright
Branch:
Changes by: Jeffrey Bedard <address@hidden> 05/07/04 18:58:18
Modified files:
src/wmarmon : wmarmon.c
Log message:
Added shaped border for proper appearance in slit.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/antiright/antiright/src/wmarmon/wmarmon.c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: antiright/src/wmarmon/wmarmon.c
diff -u antiright/src/wmarmon/wmarmon.c:1.6 antiright/src/wmarmon/wmarmon.c:1.7
--- antiright/src/wmarmon/wmarmon.c:1.6 Mon Jul 4 17:23:16 2005
+++ antiright/src/wmarmon/wmarmon.c Mon Jul 4 18:58:17 2005
@@ -29,6 +29,8 @@
#include <unistd.h>
#include <sys/sysinfo.h>
#include <time.h>
+#include <X11/extensions/shape.h>
+#include "pixmask.xbm"
/* This is a debug marking function. */
#define ARBUG \
@@ -127,8 +129,6 @@
char *hostname=getenv("HOSTNAME");
get_values();
- arshell_set_foreground(215, 215, 215);
- XFillRectangle(display, iconwin, gc, 0, 0, 64, 64);
getloadavg(load, 3);
arshell_set_foreground(0, 0, 0);
XFillRectangle(display, iconwin, gc, 4, 4, 56, 56);
@@ -213,6 +213,7 @@
/*XTextProperty name;*/
XGCValues gcv;
unsigned long gcm;
+ Pixmap pixmask;
display=XOpenDisplay((char*)getenv("DISPLAY"));
if(display == NULL)
@@ -271,6 +272,15 @@
gcv.background = WhitePixel(display, DefaultScreen(display));
gcv.graphics_exposures = 0;
gc = XCreateGC(display, DefaultRootWindow(display), gcm, &gcv);
+
+ pixmask = XCreateBitmapFromData(display, window,
+ (const char*)pixmask_bits,
+ pixmask_width, pixmask_height);
+ XShapeCombineMask(display, window, ShapeBounding, 0, 0,
+ pixmask, ShapeSet);
+ XShapeCombineMask(display, iconwin, ShapeBounding, 0, 0,
+ pixmask, ShapeSet);
+
mywmhints.initial_state = WithdrawnState;
mywmhints.icon_window = iconwin;
mywmhints.icon_x = mysizehints.x;