nearly one month ago, i found my xfce4-panel-svn can't work with openbox properly
also some ARCHer complaint it in our forum

Will Udovich just told me to use a simple_strut program
but today, i found a magic way to solve this problem :)

simply add a sleep time before lanuch openbox
let xfce4-panel complete its initialization first

here's my .xinitrc

#!/bin/sh

#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

feh --bg-scale Downloads/looks/gliding_into_a_cold_dawn.jpg
xfce-mcs-manager&
xfce4-panel&
conky
sleep 1
exec openbox


since an AMD Athlon XP2500+ in my machine, one second seems enough
if this method won't work, try larger sleep time

Good Luck

2006/4/23, Will Udovich <[EMAIL PROTECTED]>:
Rezza and I had this discussion a few weeks ago. For him, his windows
saw the panel just fine and it worked. I was using pekwm and this did
not happen. I then found this nice little program which will set the
"strut" around your desktop as to where windows will minimize or
maximize to.

Code:

#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>

#define LEFT 30
#define RIGHT 30
#define TOP 30
#define BOTTOM 30

int main(int argc, char **argv)
{
   Display    *dpy;
   Window      win;
   XEvent      event;
   unsigned long strut[4];
   XWMHints xwmh = { (InputHint|StateHint), False, IconicState, 0, 0, 0,
0, 0, 0, };

   if ((dpy = XOpenDisplay(NULL)) == NULL) {
      fprintf(stderr, "%s: can't open %s\en", argv[0], XDisplayName(NULL));
      exit(1);
   }

   win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy),
         0, 0, 1, 1, 0, 0, 0);

   XSetWMHints(dpy, win, &xwmh);
   XMapWindow(dpy, win);

   strut[0] = LEFT;
   strut[1] = RIGHT;
   strut[2] = TOP;
   strut[3] = BOTTOM;
   XChangeProperty (dpy, win, XInternAtom(dpy, "_NET_WM_STRUT", False),
XA_CARDINAL, 32, PropModeReplace, (unsigned char *) strut, 4);

   while (1) {
      XNextEvent(dpy, &event);
   }
}


To Compile:

gcc -L/usr/X11R6/lib -lX11 -o simple_strut simple_strut.c



Adjust the values which are set to 30 for all borders by default. I set
left and right to zero, and then changed top and bottom to accommodate
my panel. It may take a few tries to get things just right. Once the
program has compiled, run it in the background and your windows should
maximize right where you want them to. Good luck!


_______________________________________________
arch mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/arch

Reply via email to