[vte] vteapp: Use vte_terminal_match_check_event
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] vteapp: Use vte_terminal_match_check_event
- Date: Wed, 7 Oct 2015 20:16:16 +0000 (UTC)
commit b9f2f05eba85bab72db475e0dc2738de7b553eeb
Author: Christian Persch <chpe gnome org>
Date: Wed Oct 7 22:15:06 2015 +0200
vteapp: Use vte_terminal_match_check_event
src/vteapp.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/vteapp.c b/src/vteapp.c
index dfc0604..9931b5f 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -145,7 +145,6 @@ button_pressed(GtkWidget *widget, GdkEventButton *event, gpointer data)
char *match;
int tag;
GtkBorder padding;
- int char_width, char_height;
switch (event->button) {
case 3:
@@ -154,12 +153,9 @@ button_pressed(GtkWidget *widget, GdkEventButton *event, gpointer data)
gtk_style_context_get_padding(gtk_widget_get_style_context(widget),
gtk_widget_get_state_flags(widget),
&padding);
- char_width = vte_terminal_get_char_width (terminal);
- char_height = vte_terminal_get_char_height (terminal);
- match = vte_terminal_match_check(terminal,
- (event->x - padding.left) / char_width,
- (event->y - padding.top) / char_height,
- &tag);
+ match = vte_terminal_match_check_event(terminal,
+ (GdkEvent*)event,
+ &tag);
if (match != NULL) {
g_print("Matched `%s' (%d).\n", match, tag);
g_free(match);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]