Re: Panels with compiz

Lucas Hazel <[email protected]>
Newsgroups gmane.comp.desktop.rox.devel
Organization Digit Illogic
Message-ID <[email protected]>
On Tue, 29 Apr 2008 20:49:13 +1000
Lucas Hazel <[email protected]> wrote:

> On Mon, 28 Apr 2008 09:02:43 +1000
> Lucas Hazel <[email protected]> wrote:
> 
> > On Sun, 27 Apr 2008 15:06:24 +0100
> > "Thomas Leonard" <[email protected]> wrote:
> > 
> > > 2008/4/27 Lucas Hazel <[email protected]>:
> > > > On Fri, 25 Apr 2008 23:24:52 +1000
> > > >
> > > > Lucas Hazel <[email protected]> wrote:
> > > >
> > > >  >
> > > >  > I just upgraded to compiz-fusion 0.7.4, and the panels come
> > > >  > off the screen.
> > > > > Not sure if this a bug with ROX or compiz though.
> > > >  >
> > > >
> > > >  Here is a screenshot of the problem,
> > > > http://i27.tinypic.com/so1stu.jpg
> > > >
> > > >  I'm almost certain this is a ROX related bug now. I did a quick
> > > > test to see how compiz handles dock type windows:
> > > >
> > > >  #include <gtk/gtk.h>
> > > >
> > > >  int main(int argc, char **argv) {
> > > >         GtkWidget *panel;
> > > >         gtk_init(&argc, &argv);
> > > >         panel = gtk_window_new(GTK_WINDOW_TOPLEVEL);
> > > >         gtk_window_set_type_hint(GTK_WINDOW(panel),
> > > >                 GDK_WINDOW_TYPE_HINT_DOCK);
> > > >         gtk_widget_show(panel);
> > > >         gtk_main();
> > > >         return 0;
> > > >  }
> > > >
> > > >  Under compiz this immediately put the window onto the edge of
> > > > the screen, made it sticky and ignored by pagers and tasklists.
> > > > So the only requirement under compiz to create a panel is to
> > > > set the dock type window hint.
> > > >
> > > >  I've been playing with the X11 magic in gui_support.c and
> > > > panel.c but can't seem to pinpoint the cause. Is there anywhere
> > > > else I should be looking? Or any ideas what might cause this
> > > > effect?
> > > 
> > > Is panel_setup_struts() causing the problem?
> > > 
> > > 
> > 
> > That was my immediate reaction because it looks like the panels are
> > being place outside of the struts. I turned off struts in the code
> > and sure enough the panels go to the edge, but this breaks the "do
> > not cover panel" option. I've installed fbpanel to see if there is
> > anything noticably different, which there isn't. fbpabel uses struts
> > and it a dock type window, yet manages to sit on the screen edge.
> 
> I'm trying to come up with a minimal example of a dock type window
> with struts, but I can't get it to set the strut hints. I've attached
> the example, just wondering if there was something obvious I was
> missing?
> 

I managed to get my minimal demo to work by setting the strut
properties after the window is displayed, this has me thinking that
the bug might have something to do with the order in which properties
are set.

I'm guessing some form of profiling is required for me to investigate
this theory, something I've not really done before (rather than munging
the code with debug statements).

Is there a tool or technique that will make this task a bit easier for
me that anyone can recommend?

-- 
Lucas Hazel <[email protected]>

AMAC Digital Products
Technician
209 Beardy Street, Armidale NSW
[phone: +61267711287]

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.