*** empty log message ***

This commit is contained in:
Björn Lindqvist 2006-04-10 08:30:02 +00:00
parent c2b4a65e75
commit 4730cb57bd
5 changed files with 12 additions and 76 deletions

View File

@ -1,3 +1,15 @@
2006-04-10 Björn Lindqvist <bjourne@gmail.com>
* display.c (meta_display_open, event_callback):
* ui.c (meta_ui_get_double_click_timeout):
Delete dead code that used to handle double click on the
titlebar. Remove the attributes last_button_time,
last_button_xwindow, last_button_num and is_double_click from
MetaDisplay and the functions meta_ui_get_double_click_timeout()
and meta_display_is_double_click() from their respective
files. Fixes #337507.
2006-03-27 Gora Mohanty <gmohanty@cvs.gnome.org> 2006-03-27 Gora Mohanty <gmohanty@cvs.gnome.org>
* src/metacity.schemas.in: * src/metacity.schemas.in:

View File

@ -538,11 +538,6 @@ meta_display_open (const char *name)
display->window_ids = g_hash_table_new (meta_unsigned_long_hash, display->window_ids = g_hash_table_new (meta_unsigned_long_hash,
meta_unsigned_long_equal); meta_unsigned_long_equal);
display->last_button_time = 0;
display->last_button_xwindow = None;
display->last_button_num = 0;
display->is_double_click = FALSE;
i = 0; i = 0;
while (i < N_IGNORED_SERIALS) while (i < N_IGNORED_SERIALS)
{ {
@ -1057,12 +1052,6 @@ meta_displays_list (void)
return all_displays; return all_displays;
} }
gboolean
meta_display_is_double_click (MetaDisplay *display)
{
return display->is_double_click;
}
static gboolean dump_events = TRUE; static gboolean dump_events = TRUE;
#ifndef USE_GDK_DISPLAY #ifndef USE_GDK_DISPLAY
@ -1345,28 +1334,6 @@ meta_display_queue_autoraise_callback (MetaDisplay *display,
display->autoraise_window = window; display->autoraise_window = window;
} }
static int
double_click_timeout_for_event (MetaDisplay *display,
XEvent *event)
{
MetaScreen *screen;
g_assert (event->type == ButtonPress ||
event->type == ButtonRelease);
screen = meta_display_screen_for_root (display,
event->xbutton.root);
if (screen == NULL)
{
/* Odd, we aren't managing this screen */
meta_warning ("Received button event on root 0x%lx we aren't managing\n",
event->xbutton.root);
return 250; /* make up number */
}
return meta_ui_get_double_click_timeout (screen->ui);
}
#if 0 #if 0
static void static void
handle_net_moveresize_window (MetaDisplay* display, handle_net_moveresize_window (MetaDisplay* display,
@ -1510,27 +1477,6 @@ event_callback (XEvent *event,
if (event->xbutton.button == 4 || if (event->xbutton.button == 4 ||
event->xbutton.button == 5) event->xbutton.button == 5)
return FALSE; return FALSE;
/* mark double click events, kind of a hack, oh well. */
if (((int)event->xbutton.button) == display->last_button_num &&
event->xbutton.window == display->last_button_xwindow &&
event->xbutton.time < (display->last_button_time +
double_click_timeout_for_event (display,
event)))
{
display->is_double_click = TRUE;
meta_topic (META_DEBUG_EVENTS,
"This was the second click of a double click\n");
}
else
{
display->is_double_click = FALSE;
}
display->last_button_num = event->xbutton.button;
display->last_button_xwindow = event->xbutton.window;
display->last_button_time = event->xbutton.time;
} }
else if (event->type == UnmapNotify) else if (event->type == UnmapNotify)
{ {

View File

@ -225,12 +225,6 @@ struct _MetaDisplay
XErrorEvent *error); XErrorEvent *error);
int server_grab_count; int server_grab_count;
/* for double click */
Time last_button_time;
Window last_button_xwindow;
int last_button_num;
guint is_double_click : 1;
/* serials of leave/unmap events that may /* serials of leave/unmap events that may
* correspond to an enter event we should * correspond to an enter event we should
* ignore * ignore
@ -402,7 +396,6 @@ MetaScreen* meta_display_screen_for_xwindow (MetaDisplay *display,
Window xindow); Window xindow);
void meta_display_grab (MetaDisplay *display); void meta_display_grab (MetaDisplay *display);
void meta_display_ungrab (MetaDisplay *display); void meta_display_ungrab (MetaDisplay *display);
gboolean meta_display_is_double_click (MetaDisplay *display);
void meta_display_unmanage_screen (MetaDisplay *display, void meta_display_unmanage_screen (MetaDisplay *display,
MetaScreen *screen); MetaScreen *screen);

View File

@ -930,20 +930,6 @@ meta_stock_icons_init (void)
g_object_unref (G_OBJECT (factory)); g_object_unref (G_OBJECT (factory));
} }
int
meta_ui_get_double_click_timeout (MetaUI *ui)
{
GtkSettings *settings;
int timeout;
settings = gtk_widget_get_settings (GTK_WIDGET (ui->frames));
timeout = 250;
g_object_get (G_OBJECT (settings), "gtk-double-click-time", &timeout, NULL);
return timeout;
}
int int
meta_ui_get_drag_threshold (MetaUI *ui) meta_ui_get_drag_threshold (MetaUI *ui)
{ {

View File

@ -191,7 +191,6 @@ gchar* meta_ui_accelerator_name (unsigned int keysym,
gboolean meta_ui_window_is_widget (MetaUI *ui, gboolean meta_ui_window_is_widget (MetaUI *ui,
Window xwindow); Window xwindow);
int meta_ui_get_double_click_timeout (MetaUI *ui);
int meta_ui_get_drag_threshold (MetaUI *ui); int meta_ui_get_drag_threshold (MetaUI *ui);
#include "tabpopup.h" #include "tabpopup.h"