[yocto] [matchbox-panel-2][PATCH 06/25] launcher: port to GTK+ 3
Jussi Kukkonen
jussi.kukkonen at intel.com
Tue May 3 04:30:25 PDT 2016
From: Ross Burton <ross.burton at intel.com>
---
applets/launcher/launcher.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/applets/launcher/launcher.c b/applets/launcher/launcher.c
index 7e12814..0ec8a43 100644
--- a/applets/launcher/launcher.c
+++ b/applets/launcher/launcher.c
@@ -143,6 +143,7 @@ button_release_event_cb (GtkWidget *event_box,
{
int x, y;
pid_t child_pid = 0;
+ GtkAllocation allocation;
#ifdef USE_LIBSN
SnLauncherContext *context;
#endif
@@ -154,16 +155,17 @@ button_release_event_cb (GtkWidget *event_box,
/* Only process if the button was released inside the button */
gtk_widget_translate_coordinates (event_box,
- event_box->parent,
+ gtk_widget_get_parent (event_box),
event->x,
event->y,
&x,
&y);
- if (x < event_box->allocation.x ||
- x > event_box->allocation.x + event_box->allocation.width ||
- y < event_box->allocation.y ||
- y > event_box->allocation.y + event_box->allocation.height)
+ gtk_widget_get_allocation (event_box, &allocation);
+ if (x < allocation.x ||
+ x > allocation.x + allocation.width ||
+ y < allocation.y ||
+ y > allocation.y + allocation.height)
return TRUE;
#ifdef USE_LIBSN
--
2.8.1
More information about the yocto
mailing list