Revert prior change

This commit is contained in:
Rob Adams 2003-12-13 23:00:06 +00:00
parent 7630d22b8d
commit 9bde925d3d
7 changed files with 22 additions and 137 deletions

View File

@ -274,8 +274,7 @@ meta_display_open (const char *name)
"_METACITY_SENTINEL",
"_NET_WM_STRUT_PARTIAL",
"_NET_WM_ACTION_FULLSCREEN",
"_NET_WM_ACTION_MINIMIZE",
"_NET_WM_USER_TIME"
"_NET_WM_ACTION_MINIMIZE"
};
Atom atoms[G_N_ELEMENTS(atom_names)];
@ -420,7 +419,6 @@ meta_display_open (const char *name)
display->atom_net_wm_strut_partial = atoms[80];
display->atom_net_wm_action_fullscreen = atoms[81];
display->atom_net_wm_action_minimize = atoms[82];
display->atom_net_wm_user_time = atoms[83];
display->prop_hooks = NULL;
meta_display_init_window_prop_hooks (display);
@ -1170,8 +1168,7 @@ event_callback (XEvent *event,
Window modified;
gboolean frame_was_receiver;
gboolean filter_out_event;
Time event_time;
display = data;
if (dump_events)
@ -1324,15 +1321,7 @@ event_callback (XEvent *event,
meta_compositor_process_event (display->compositor,
event,
window);
if (window &&
(event->type == KeyPress ||
event->type == ButtonPress) &&
(CurrentTime !=
(event_time = event_get_time (display, event)))) {
window->net_wm_user_time = event_time;
}
switch (event->type)
{
case KeyPress:
@ -1878,10 +1867,9 @@ event_callback (XEvent *event,
{
MetaGroup *group;
MetaScreen *screen;
if (window && !frame_was_receiver) {
if (window && !frame_was_receiver)
meta_window_property_notify (window, event);
}
group = meta_display_lookup_group (display,
event->xproperty.window);

View File

@ -172,7 +172,6 @@ struct _MetaDisplay
Atom atom_gnome_panel_action_run_dialog;
Atom atom_metacity_sentinel;
Atom atom_net_wm_strut_partial;
Atom atom_net_wm_user_time;
/* This is the actual window from focus events,
* not the one we last set

View File

@ -82,7 +82,7 @@ set_wm_check_hint (MetaScreen *screen)
static int
set_supported_hint (MetaScreen *screen)
{
#define N_SUPPORTED 69
#define N_SUPPORTED 68
Atom atoms[N_SUPPORTED];
atoms[0] = screen->display->atom_net_wm_name;
@ -153,7 +153,6 @@ set_supported_hint (MetaScreen *screen)
atoms[65] = screen->display->atom_net_wm_strut_partial;
atoms[66] = screen->display->atom_net_wm_action_fullscreen;
atoms[67] = screen->display->atom_net_wm_action_minimize;
atoms[68] = screen->display->atom_net_wm_user_time;
XChangeProperty (screen->display->xdisplay, screen->xroot,
screen->display->atom_net_supported,

View File

@ -170,33 +170,6 @@ reload_net_wm_pid (MetaWindow *window,
}
}
static void
init_net_wm_user_time (MetaDisplay *display,
Atom property,
MetaPropValue *value)
{
value->type = META_PROP_VALUE_CARDINAL;
value->atom = display->atom_net_wm_user_time;
}
static void
reload_net_wm_user_time (MetaWindow *window,
MetaPropValue *value)
{
if (value->type != META_PROP_VALUE_INVALID)
{
gulong cardinal = (int) value->v.cardinal;
if (cardinal <= 0)
meta_warning (_("Application set a bogus _NET_WM_USER_TIME %ld\n"),
cardinal);
else
{
window->net_wm_user_time = cardinal;
}
}
}
static void
set_window_title (MetaWindow *window,
const char *title)
@ -841,7 +814,7 @@ reload_wm_hints (MetaWindow *window,
#define N_HOOKS 24
#define N_HOOKS 23
void
meta_display_init_window_prop_hooks (MetaDisplay *display)
@ -871,16 +844,6 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
hooks[i].reload_func = reload_net_wm_pid;
++i;
hooks[i].property = display->atom_net_wm_user_time;
hooks[i].init_func = init_net_wm_user_time;
hooks[i].reload_func = reload_net_wm_user_time;
++i;
hooks[i].property = display->atom_net_wm_user_time;
hooks[i].init_func = init_net_wm_user_time;
hooks[i].reload_func = reload_net_wm_user_time;
++i;
hooks[i].property = display->atom_net_wm_name;
hooks[i].init_func = init_net_wm_name;
hooks[i].reload_func = reload_net_wm_name;

View File

@ -582,17 +582,6 @@ meta_window_new_with_attrs (MetaDisplay *display,
meta_display_grab_window_buttons (window->display, window->xwindow);
meta_display_grab_focus_window_button (window->display, window);
if (window->type == META_WINDOW_DESKTOP ||
window->type == META_WINDOW_DOCK)
{
/* Change the default, but don't enforce this if the user
* focuses the dock/desktop and unsticks it using key shortcuts.
* Need to set this before adding to the workspaces so the MRU
* lists will be updated.
*/
window->on_all_workspaces = TRUE;
}
/* For the workspace, first honor hints,
* if that fails put transients with parents,
* otherwise put window on active space
@ -606,11 +595,8 @@ meta_window_new_with_attrs (MetaDisplay *display,
"Window %s is initially on all spaces\n",
window->desc);
/* need to set on_all_workspaces first so that it will be
* added to all the MRU lists
*/
window->on_all_workspaces = TRUE;
meta_workspace_add_window (window->screen->active_workspace, window);
window->on_all_workspaces = TRUE;
}
else
{
@ -650,8 +636,6 @@ meta_window_new_with_attrs (MetaDisplay *display,
tmp_list = parent->workspaces;
while (tmp_list != NULL)
{
/* this will implicitly add to the appropriate MRU lists
*/
meta_workspace_add_window (tmp_list->data, window);
tmp_list = tmp_list->next;
@ -670,6 +654,16 @@ meta_window_new_with_attrs (MetaDisplay *display,
meta_workspace_add_window (space, window);
}
if (window->type == META_WINDOW_DESKTOP ||
window->type == META_WINDOW_DOCK)
{
/* Change the default, but don't enforce this if
* the user focuses the dock/desktop and unsticks it
* using key shortcuts
*/
window->on_all_workspaces = TRUE;
}
/* for the various on_all_workspaces = TRUE possible above */
meta_window_set_current_workspace_hint (window);
@ -4323,21 +4317,7 @@ process_property_notify (MetaWindow *window,
meta_window_reload_property (window,
window->display->atom_metacity_update_counter);
}
else if (event->atom == window->display->atom_net_wm_user_time)
{
meta_verbose ("Property notify on %s for _NET_WM_USER_TIME\n", window->desc);
meta_window_reload_property (window,
window->display->atom_net_wm_user_time);
}
else if (event->atom == window->display->atom_net_wm_user_time)
{
meta_verbose ("Property notify on %s for _NET_WM_USER_TIME\n", window->desc);
meta_window_reload_property (window,
window->display->atom_net_wm_user_time);
}
return TRUE;
}

View File

@ -242,11 +242,6 @@ struct _MetaWindow
/* if TRUE we have a grab on the focus click buttons */
guint have_focus_click_grab : 1;
/* set to the most recent user-interaction event timestamp that we
* know about for this window
*/
Time net_wm_user_time;
#ifdef HAVE_XSYNC
/* XSync update counter */

View File

@ -112,30 +112,11 @@ meta_workspace_add_window (MetaWorkspace *workspace,
{
g_return_if_fail (!meta_workspace_contains_window (workspace, window));
/* If the window is on all workspaces, we want to add it to all mru
* lists, otherwise just add it to this workspaces mru list
*/
if (window->on_all_workspaces)
{
if (g_list_length (window->workspaces) == 0)
{
GList* tmp = window->screen->workspaces;
while (tmp)
{
MetaWorkspace* work = (MetaWorkspace*) tmp->data;
if (!g_list_find (work->mru_list, window))
work->mru_list = g_list_append (work->mru_list, window);
tmp = tmp->next;
}
}
}
else if (!g_list_find (workspace->mru_list, window))
workspace->mru_list = g_list_prepend (workspace->mru_list, window);
workspace->windows = g_list_prepend (workspace->windows, window);
window->workspaces = g_list_prepend (window->workspaces, workspace);
workspace->mru_list = g_list_append (workspace->mru_list, window);
meta_window_set_current_workspace_hint (window);
meta_window_queue_calc_showing (window);
@ -161,27 +142,7 @@ meta_workspace_remove_window (MetaWorkspace *workspace,
workspace->windows = g_list_remove (workspace->windows, window);
window->workspaces = g_list_remove (window->workspaces, workspace);
/* If the window is on all workspaces, we don't want to remove it
* from the MRU list unless this causes it to be removed from all
* workspaces
*/
if (window->on_all_workspaces)
{
if (g_list_length (window->workspaces) == 0)
{
GList* tmp = window->screen->workspaces;
while (tmp)
{
MetaWorkspace* work = (MetaWorkspace*) tmp->data;
work->mru_list = g_list_remove (work->mru_list, window);
tmp = tmp->next;
}
}
}
else
workspace->mru_list = g_list_remove (workspace->mru_list, window);
workspace->mru_list = g_list_remove (workspace->mru_list, window);
meta_window_set_current_workspace_hint (window);