A lot 4.6 plugins have an event window as plugin child,
but most of them do not disable the visible event window,
resulting in an ugly looking plugin with composited panels.
So detect if the plugin has an event window as child and
hide the visible window.
For this change, plugins need to recompile.
The background alpha was not send when the other panel was opaque,
leaving a transparent item in opaque panel.
The background was also not unset, so for example the image or
color was not unset.
Because of a quick widget hide/show to make sure the
window was redrawn, the window became invisible when quickly
restarting the wm. Remove this unneeded trick.
Also cleanup the colormap handling, we now only set the rgba
colormap in the init function, since it depends on the screen
and won't change during runtime, this makes things a lot easier.
We chain the expose event to GtkWindow wich on his turn exposes
the container child in GtkContainer. Because we draw (alpha background
and background color) on the window, the child needs to be exposed after
this, so drop the first expose event and only expose the child
in PanelWindow.
When the panel is horizontal and snapped to the left or right
border (not in a corner) is should hide sideways. Same when
a vertical panel is snapped to the top or bottom of the screen.
The panel sometimes never made it to the correct screen and
it could even crash on startup, so don't try on the binding
to position the screen, but pass it along when creating the
panel window.
But with 1 difference; it seems some implementations wait
(like nm-applet) on the size-changed signal. Although this
is a stupid trick, we can easily work around it by allocating
a normal size offscreen; this will trigger the signal and a new
allocation on the tray when the app completed the status icon
setup.
For dead tray icons that are still in the panel, the 1x1 hack
will continue to work since they have no window.
Because the query-tooltip query in Gtk is not implemented correctly
(although the gtk docs say otherwise), see https://bugzilla.gnome.org/show_bug.cgi?id=516130
we cache the pixbuf, so setting the tooltip will be faster.
- Remove from socket hashtable before telling others the
icon will be removed, this to make sure the window
still exists.
- Move composited detection to socket init, no need to do this
during realize, since we restart the tray on compositing
changes anyway.