Commit 4730cb57 authored by Björn Lindqvist's avatar Björn Lindqvist
Browse files

*** empty log message ***

parent c2b4a65e
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>
* src/metacity.schemas.in:
......
......@@ -538,11 +538,6 @@ meta_display_open (const char *name)
display->window_ids = g_hash_table_new (meta_unsigned_long_hash,
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;
while (i < N_IGNORED_SERIALS)
{
......@@ -1057,12 +1052,6 @@ meta_displays_list (void)
return all_displays;
}
gboolean
meta_display_is_double_click (MetaDisplay *display)
{
return display->is_double_click;
}
static gboolean dump_events = TRUE;
#ifndef USE_GDK_DISPLAY
......@@ -1345,28 +1334,6 @@ meta_display_queue_autoraise_callback (MetaDisplay *display,
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
static void
handle_net_moveresize_window (MetaDisplay* display,
......@@ -1510,27 +1477,6 @@ event_callback (XEvent *event,
if (event->xbutton.button == 4 ||
event->xbutton.button == 5)
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)
{
......
......@@ -225,12 +225,6 @@ struct _MetaDisplay
XErrorEvent *error);
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
* correspond to an enter event we should
* ignore
......@@ -402,7 +396,6 @@ MetaScreen* meta_display_screen_for_xwindow (MetaDisplay *display,
Window xindow);
void meta_display_grab (MetaDisplay *display);
void meta_display_ungrab (MetaDisplay *display);
gboolean meta_display_is_double_click (MetaDisplay *display);
void meta_display_unmanage_screen (MetaDisplay *display,
MetaScreen *screen);
......
......@@ -930,20 +930,6 @@ meta_stock_icons_init (void)
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
meta_ui_get_drag_threshold (MetaUI *ui)
{
......
......@@ -191,7 +191,6 @@ gchar* meta_ui_accelerator_name (unsigned int keysym,
gboolean meta_ui_window_is_widget (MetaUI *ui,
Window xwindow);
int meta_ui_get_double_click_timeout (MetaUI *ui);
int meta_ui_get_drag_threshold (MetaUI *ui);
#include "tabpopup.h"
......
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