aboutsummaryrefslogtreecommitdiff
path: root/src/idocalendarmenuitem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/idocalendarmenuitem.c')
-rw-r--r--src/idocalendarmenuitem.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/idocalendarmenuitem.c b/src/idocalendarmenuitem.c
index aa5314c..085a2da 100644
--- a/src/idocalendarmenuitem.c
+++ b/src/idocalendarmenuitem.c
@@ -197,17 +197,14 @@ ido_calendar_menu_item_button_press (GtkWidget *widget,
GdkEventButton *event)
{
GtkWidget *calendar = IDO_CALENDAR_MENU_ITEM (widget)->priv->calendar;
- g_debug("Button Press");
if (event->button == 1) {
if (gtk_widget_get_window (calendar) != NULL) {
gdk_window_raise (gtk_widget_get_window (calendar));
- g_debug("Raise window");
}
if (!gtk_widget_has_focus (calendar)) {
gtk_widget_grab_focus (calendar);
- g_debug("Grab focus: %d", gtk_widget_has_focus(calendar));
}
GdkEvent * newevent = gdk_event_copy((GdkEvent *)(event));
@@ -217,8 +214,6 @@ ido_calendar_menu_item_button_press (GtkWidget *widget,
gint root_x = event->x_root;
gint root_y = event->y_root;
- g_debug("Root X: %d Y: %d", root_x, root_y);
-
for (child = children; child != NULL; child = g_list_next(child)) {
gint newx, newy;
gint winx, winy;
@@ -227,20 +222,14 @@ ido_calendar_menu_item_button_press (GtkWidget *widget,
((GdkEventButton *)newevent)->window = newwindow;
gdk_window_get_origin(newwindow, &winx, &winy);
- g_debug("Window position: %dx%d", winx, winy);
newx = root_x - winx;
newy = root_y - winy;
if (newx >= 0 && newy >= 0 && newx < gdk_window_get_width(newwindow) && newy < gdk_window_get_height(newwindow)) {
- gboolean returned = FALSE;
- g_debug("Simulating event at: %dx%d", newx, newy);
((GdkEventButton *)newevent)->x = newx;
((GdkEventButton *)newevent)->y = newy;
- returned = GTK_WIDGET_GET_CLASS(calendar)->button_press_event(GTK_WIDGET(calendar), (GdkEventButton*)newevent);
- if (returned) {
- g_debug("\tHandled");
- }
+ GTK_WIDGET_GET_CLASS(calendar)->button_press_event(GTK_WIDGET(calendar), (GdkEventButton*)newevent);
}
}
return TRUE;
@@ -253,18 +242,8 @@ static gboolean
ido_calendar_menu_item_button_release (GtkWidget *widget,
GdkEventButton *event)
{
- g_debug("Button Release");
- // GtkWidget *calendar = IDO_CALENDAR_MENU_ITEM (widget)->priv->calendar;
GtkWidget *calendar = IDO_CALENDAR_MENU_ITEM (widget)->priv->calendar;
-
-GdkEvent * newevent = gdk_event_copy((GdkEvent *)(event));
-GList * children = gdk_window_get_children(gtk_widget_get_window(calendar));
-GList * child;
-for (child = children; child != NULL; child = g_list_next(child)) {
-((GdkEventButton *)newevent)->window = (GdkWindow*)child->data;
-
- GTK_WIDGET_GET_CLASS(calendar)->button_release_event(GTK_WIDGET(calendar), (GdkEventButton*)newevent);
- }
+ GTK_WIDGET_GET_CLASS(calendar)->button_release_event(GTK_WIDGET(calendar), event);
return TRUE;
}