Re: Panels with compiz
Lucas Hazel <[email protected]>
| Newsgroups | gmane.comp.desktop.rox.devel |
|---|---|
| Message-ID | <[email protected]> |
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? -- Lucas Hazel <[email protected]> ------------------------------------------------------------------------- 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 _______________________________________________ rox-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rox-devel
test.c
(text/x-csrc, 1 KB)
#include <gtk/gtk.h>
#include <gdk/gdk.h>
int main(int argc, char **argv) {
GtkWidget *panel;
struct {
gulong left, right, top, bottom;
gulong left_start_y, left_end_y;
gulong right_start_y, right_end_y;
gulong top_start_x, top_end_x;
gulong bottom_start_x, bottom_end_x;
} strut = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
gtk_init(&argc, &argv);
panel = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_resize(GTK_WINDOW(panel), 1440, 32);
gtk_window_set_type_hint(GTK_WINDOW(panel), GDK_WINDOW_TYPE_HINT_DOCK);
strut.top = 32;
strut.top_start_x = 0;
strut.top_end_x = 1439;
gdk_property_change(panel->window,
gdk_atom_intern("_NET_WM_STRUT", FALSE),
gdk_atom_intern("CARDINAL", FALSE),
32, GDK_PROP_MODE_REPLACE,
(gchar *) &strut, 4);
gdk_property_change(panel->window,
gdk_atom_intern("_NET_WM_STRUT_PARTIAL", FALSE),
gdk_atom_intern("CARDINAL", FALSE),
32, GDK_PROP_MODE_REPLACE,
(gchar *) &strut, 12);
gtk_widget_show(GTK_WIDGET(panel));
gtk_main();
return 0;
}