Commit 15a33158 authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz

Fix dragging across the keyboard

parent 82d1f256
......@@ -253,14 +253,16 @@ eek_gtk_keyboard_real_motion_notify_event (GtkWidget *self,
for (head = list; head; head = g_list_next (head)) {
if (head->data == key)
found = TRUE;
else
g_signal_emit_by_name (head->data, "cancelled");
else {
eek_keyboard_release_key(priv->keyboard, head->data, event->time);
on_key_released(key, EEK_GTK_KEYBOARD(self));
}
}
g_list_free (list);
if (!found) {
g_log("squeek", G_LOG_LEVEL_DEBUG, "emit EekKey pressed");
g_signal_emit_by_name (key, "pressed");
eek_keyboard_press_key(priv->keyboard, key, event->time);
on_key_pressed(key, EEK_GTK_KEYBOARD(self));
}
}
return TRUE;
......
......@@ -49,7 +49,6 @@ enum {
enum {
LOCKED,
UNLOCKED,
CANCELLED,
LAST_SIGNAL
};
......@@ -94,17 +93,6 @@ eek_key_real_unlocked (EekKey *self)
#endif
}
static void
eek_key_real_cancelled (EekKey *self)
{
EekKeyPrivate *priv = EEK_KEY_GET_PRIVATE(self);
priv->is_pressed = FALSE;
#if DEBUG
g_debug ("cancelled %X", eek_key_get_keycode (self));
#endif
}
static void
eek_key_finalize (GObject *object)
{
......@@ -196,7 +184,6 @@ eek_key_class_init (EekKeyClass *klass)
/* signals */
klass->locked = eek_key_real_locked;
klass->unlocked = eek_key_real_unlocked;
klass->cancelled = eek_key_real_cancelled;
/**
* EekKey:keycode:
......@@ -293,23 +280,6 @@ eek_key_class_init (EekKeyClass *klass)
NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
/**
* EekKey::cancelled:
* @key: an #EekKey
*
* The ::cancelled signal is emitted each time @key is shifted to
* the cancelled state.
*/
signals[CANCELLED] =
g_signal_new (I_("cancelled"),
G_TYPE_FROM_CLASS(gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(EekKeyClass, cancelled),
NULL,
NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
static void
......
......@@ -76,7 +76,6 @@ struct _EekKeyClass
/* signals */
void (* locked) (EekKey *key);
void (* unlocked) (EekKey *key);
void (* cancelled) (EekKey *key);
};
GType eek_key_get_type (void) G_GNUC_CONST;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment