gnome-terminal r2931 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r2931 - trunk/src
- Date: Thu, 26 Jun 2008 19:51:16 +0000 (UTC)
Author: chpe
Date: Thu Jun 26 19:51:16 2008
New Revision: 2931
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2931&view=rev
Log:
Bug 385695 â "open link" not always shown on context menu (url grabber)
Take vte's padding into account when calculating the row/col position of the match and context menu click.i
Modified:
trunk/src/terminal-screen.c
Modified: trunk/src/terminal-screen.c
==============================================================================
--- trunk/src/terminal-screen.c (original)
+++ trunk/src/terminal-screen.c Thu Jun 26 19:51:16 2008
@@ -1603,23 +1603,20 @@
TerminalScreenPrivate *priv = screen->priv;
gboolean (* button_press_event) (GtkWidget*, GdkEventButton*) =
GTK_WIDGET_CLASS (terminal_screen_parent_class)->button_press_event;
- int char_width, char_height;
- gboolean dingus_button;
+ int char_width, char_height, x, y, xpad, ypad;
char *matched_string;
int matched_flavor = 0;
guint state;
state = event->state & gtk_accelerator_get_default_mod_mask ();
+ vte_terminal_get_padding (VTE_TERMINAL (screen), &xpad, &ypad);
terminal_screen_get_cell_size (screen, &char_width, &char_height);
- matched_string = terminal_screen_check_match (screen,
- event->x / char_width,
- event->y / char_height,
- &matched_flavor);
+ x = (event->x - xpad) / char_width;
+ y = (event->y - ypad) / char_height;
+ matched_string = terminal_screen_check_match (screen, x, y, &matched_flavor);
- dingus_button = ((event->button == 1) || (event->button == 2));
-
if (matched_string != NULL &&
(event->button == 1 || event->button == 2) &&
(state & GDK_CONTROL_MASK))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]