diff options
author | monsta <[email protected]> | 2017-01-24 12:25:54 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2017-01-24 12:30:42 +0300 |
commit | ede11720307927f40c7c9f9dd2137172cc8c1e3b (patch) | |
tree | 68e482dc90a8bc7147945f24b936e4e552db01f9 | |
parent | 5c7cc17b0ec5626256cd867c5e2ec3395e2ea941 (diff) | |
download | mate-power-manager-ede11720307927f40c7c9f9dd2137172cc8c1e3b.tar.bz2 mate-power-manager-ede11720307927f40c7c9f9dd2137172cc8c1e3b.tar.xz |
[GTK+3] inhibit applet: connect to draw signal, not to expose-event
stops runtime warnings when panel is started
ported from https://github.com/mate-desktop/mate-power-manager/commit/f311cf97ddbd2b24503beca339cd4c6c233ac9b6
-rw-r--r-- | applets/inhibit/inhibit-applet.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/applets/inhibit/inhibit-applet.c b/applets/inhibit/inhibit-applet.c index 00698c1..fc4d94f 100644 --- a/applets/inhibit/inhibit-applet.c +++ b/applets/inhibit/inhibit-applet.c @@ -656,8 +656,13 @@ gpm_inhibit_applet_init (GpmInhibitApplet *applet) /* We use g_signal_connect_after because letting the panel draw * the background is the only way to have the correct * background when a theme defines a background picture. */ +#if GTK_CHECK_VERSION (3, 0, 0) + g_signal_connect_after (G_OBJECT(applet), "draw", + G_CALLBACK(gpm_applet_draw_cb), NULL); +#else g_signal_connect_after (G_OBJECT(applet), "expose-event", G_CALLBACK(gpm_applet_draw_cb), NULL); +#endif g_signal_connect (G_OBJECT(applet), "change-background", G_CALLBACK(gpm_applet_change_background_cb), NULL); |