mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
Notify when the screen changes. Bug #379793.
2006-11-27 Christian Persch <chpe@cvs.gnome.org> * gtk/gtkstatusicon.c: Notify when the screen changes. Bug #379793.
This commit is contained in:
parent
ee294b1caf
commit
6282e799d8
@ -1,3 +1,7 @@
|
||||
2006-11-27 Christian Persch <chpe@cvs.gnome.org>
|
||||
|
||||
* gtk/gtkstatusicon.c: Notify when the screen changes. Bug #379793.
|
||||
|
||||
Mon Nov 27 12:27:06 2006 Tim Janik <timj@imendio.com>
|
||||
|
||||
* gtk/gtktextview.c: applied patch by Colin Leroy for
|
||||
|
@ -121,6 +121,8 @@ static void gtk_status_icon_get_property (GObject *object,
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
static void gtk_status_icon_size_allocate (GtkStatusIcon *status_icon,
|
||||
GtkAllocation *allocation);
|
||||
static void gtk_status_icon_screen_changed (GtkStatusIcon *status_icon,
|
||||
GdkScreen *old_screen);
|
||||
#endif
|
||||
static gboolean gtk_status_icon_button_press (GtkStatusIcon *status_icon,
|
||||
GdkEventButton *event);
|
||||
@ -411,6 +413,8 @@ gtk_status_icon_init (GtkStatusIcon *status_icon)
|
||||
|
||||
g_signal_connect_swapped (priv->tray_icon, "button-press-event",
|
||||
G_CALLBACK (gtk_status_icon_button_press), status_icon);
|
||||
g_signal_connect_swapped (priv->tray_icon, "screen-changed",
|
||||
G_CALLBACK (gtk_status_icon_screen_changed), status_icon);
|
||||
priv->image = gtk_image_new ();
|
||||
gtk_container_add (GTK_CONTAINER (priv->tray_icon), priv->image);
|
||||
|
||||
@ -971,6 +975,18 @@ gtk_status_icon_size_allocate (GtkStatusIcon *status_icon,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_status_icon_screen_changed (GtkStatusIcon *status_icon,
|
||||
GdkScreen *old_screen)
|
||||
{
|
||||
GtkStatusIconPrivate *priv = status_icon->priv;
|
||||
|
||||
if (gtk_widget_get_screen (priv->tray_icon) != old_screen)
|
||||
{
|
||||
g_object_notify (G_OBJECT (status_icon), "screen");
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user