Commit Graph

14 Commits

Author SHA1 Message Date
Florian Müllner
d21edcfed5 st: Replace deprecated macros 2015-07-22 16:00:55 +02:00
Jasper St. Pierre
08f95264d6 embedded-window: Set as app-paintable to workaround opaque region issues
In specific cases, GTK+ does not have enough information to set a correct
opaque region, in which the recommended fix is to set your window as
app-paintable. In the tray icon case, the socket window was considered
opaque but GTK+ as it had a solid window background, but it cannot have an
opaque region set, as the plug isn't composited against the socket, but
instead punches through the socket window.

https://bugzilla.gnome.org/show_bug.cgi?id=707614
2013-09-06 16:28:41 -04:00
Neil Roberts
5001bd8810 Don't use ClutterX11TexturePixmap directly to embed docked windows
Previously when a client requests that a window should be docked the
shell would reparent the socket window onto the stage's window and
then use ClutterX11TexturePixmap to get a texture to represent the
window. This will not work if Clutter is no longer using the X11
winsys for example if it becomes its own display server. Instead this
patch leaves the socket window as a child of the root window and lets
mutter create a MetaWindow out of it. If Mutter is acting as a display
server then this mechanism will still work via the headless x server.

The ShellGtkEmbed instance now registers for notification of the
‘window-created’ signal of the display so that it can find the
MetaWindow that gets created to represent the socket window. When this
window is found it is prevented from being displayed on the screen by
setting the actor's opacity to 0. An input shape is then set on the
window to prevent it receiving any input.

Instead of being a subclass of ClutterX11TexturePixmap, ShellGtkEmbed
is now a subclass of ClutterClone. When the MetaWindow is found for
the socket window the clone's source is set to the invisible actor for
the window so it can be displayed in the panel as before.

The ShellEmbeddedWindow no longer needs to know what the stage is
because it no longer reparents the socket window. Therefore the
ShellTrayManager doesn't need to know the stage either so
shell_tray_manager_manage_stage has been replaced with just
shell_tray_manager_manage_screen.

https://bugzilla.gnome.org/show_bug.cgi?id=693438
2013-03-18 16:49:47 +00:00
Jasper St. Pierre
d212d57466 shell-embedded-window: Remove hacks for old and fixed Clutter bug
We used to use realize/unrealize instead of map/unmap in ShellEmbeddedWindow
because there originally was no map/unmap. The days of this are long gone...

https://bugzilla.gnome.org/show_bug.cgi?id=672790
2012-07-13 17:28:50 -04:00
Giovanni Campagna
abcca3d3bc ShellEmbeddedWindow: don't update the size of a destroyed actor.
shell_embedded_window_hide() can be called during widget destruction,
after the associated ClutterActor has been already cleared out.
Fix a crash in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=633028
2012-01-14 13:31:04 +01:00
Giovanni Campagna
0ba7188625 Remove Gtk 2 compatibility code
It is useless now that we require Gtk 3.

https://bugzilla.gnome.org/show_bug.cgi?id=638315
2010-12-30 21:36:37 +01:00
Jason D. Clinton
7ce65e421b Fix compilation against latest GTK+-3 changes
GDK_WINDOW_XWINDOW has been removed. All calls should use
gdk_x11_window_get_xid() instead.
2010-12-02 17:12:07 -06:00
Dan Winship
ae9360659d [ShellTrayIcon] add ShellTrayIcon, make ShellTrayManager use it
The actor emitted by ShellTrayManager is now ShellTrayIcon, a subclass
of ShellGtkEmbed which has several properties on it which are (or will
soon be) useful to the shell.

Part of the rearranging to use ShellTrayIcon means that we now show
the ShellEmbeddedWindow before creating its ShellGtkEmbed, which
requires a few modifications to ShellEmbeddedWindow (notably, telling
it at construct time what stage it will be drawn on, since it needs to
know that before it has a ShellGtkEmbed now).

https://bugzilla.gnome.org/show_bug.cgi?id=608869
2010-09-23 09:49:47 -04:00
Dan Winship
63f2066135 [ShellGtkEmbed] do a better job of tracking the actor's position
Previously the code to keep the X window aligned with its actor made
various assumptions that were true in the panel status tray area but
that are not true in the message tray. Fix it up by repositioning the
X window at clutter_actor_paint() time, which will definitely be
called every time the actor moves, whether it's because of its own or
its parent/ancestor's changes.

https://bugzilla.gnome.org/show_bug.cgi?id=608869
2010-09-23 09:49:47 -04:00
Florian Müllner
6318c8e95b Add compatibility with GTK+ 2.18
To replace all calls to deprecated code, GTK+ 2.20 is required - add
some basic compatibility code, so that is still possible to build the
shell with GTK+ 2.18 when not using -DGSEAL_ENABLE.

https://bugzilla.gnome.org/show_bug.cgi?id=618258
2010-05-10 18:31:51 +02:00
Florian Müllner
8c5bb8655d Use accessor functions instead of direct access
With the transition to GTK+ 3.0, direct access to struct members
will no longer be possible.
This bumps the required minimum version of GTK+ to 2.20.

https://bugzilla.gnome.org/show_bug.cgi?id=618258
2010-05-10 18:31:51 +02:00
Florian Müllner
fb7ed1ee28 [ShellEmbeddedWindow] Set window type in g_object_new
As of 2a78adc5e3, gobject no longer allows for setting construct-only
properties via g_object_set() during object initialization; set the
properties in a custom constructor instead.

https://bugzilla.gnome.org/show_bug.cgi?id=608802
2010-02-08 18:50:05 +01:00
Dan Winship
dd8f05c81d include "config.h" in all .c files
Also, fix shell-global.c to actually compile with config.h included.

Was supposed to fix bug 602802, but doesn't...
2009-11-24 09:15:35 -05:00
Owen W. Taylor
3327a198e1 Add size negotiation to the tray icons
* Rename ShellGtkWindowActor to ShellGtkEmbed, and make it require
  a ShellEmbeddedWindow rather than a general GtkWindow.

* Add ShellEmbeddedWindow subclass of GtkWindow that bypasses most
  of the GtkWindow complexity for size negotiation, and calls out
  to a clutter actor instead; also automatically handle reparenting
  the GtkWindow into the stage window.

* Use the reworked ShellGtkEmbed in ShellTrayManager, this simplifies
  the code a bit, and more importantly results in the tray icons
  having the correct size negotiation, rather than having a fixed
  24x24 size.

http://bugzilla.gnome.org/show_bug.cgi?id=580047
2009-05-04 14:24:05 -04:00