note exciting new unminimize feature for the tab popup

2001-10-29  Havoc Pennington  <hp@pobox.com>

	* README: note exciting new unminimize feature for the tab popup

	* src/keybindings.c (process_tab_grab): use meta_window_activate()
	when choosing a window with tab popup, this should deiconify it

	* src/window.c (meta_window_client_message): use
	meta_window_activate for _NET_ACTIVE_WINDOW message
	(meta_window_activate): new function to raise/focus/unminimize
	(meta_window_flush_calc_showing): new function
	(meta_window_focus): force a calc showing on focus, so that we can
	focus the window if appropriate (it must be mapped)
This commit is contained in:
Havoc Pennington 2001-10-29 07:00:46 +00:00 committed by Havoc Pennington
parent abc8cb6ff7
commit 3b9c81f390
5 changed files with 54 additions and 15 deletions

View File

@ -1,3 +1,17 @@
2001-10-29 Havoc Pennington <hp@pobox.com>
* README: note exciting new unminimize feature for the tab popup
* src/keybindings.c (process_tab_grab): use meta_window_activate()
when choosing a window with tab popup, this should deiconify it
* src/window.c (meta_window_client_message): use
meta_window_activate for _NET_ACTIVE_WINDOW message
(meta_window_activate): new function to raise/focus/unminimize
(meta_window_flush_calc_showing): new function
(meta_window_focus): force a calc showing on focus, so that we can
focus the window if appropriate (it must be mapped)
2001-10-26 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_grab_window_buttons): fix for

8
README
View File

@ -148,11 +148,11 @@ METACITY BUGS, NON-FEATURES, AND CAVEATS
- If you want keybindings which are not the ones mentioned above
as features, you have to edit keybindings.c and recompile.
- Metacity does not have any way to unminimize a window. So
clicking the minimize button is sort of a bad idea.
- The only way to unminimize at the moment is to use the Alt+Tab
move-between-windows feature.
(If you had a WM-spec-compliant tasklist, it would work
for unminimization.)
(Update: you can use "test-wnck" from the libwnck CVS module to
for unminimization also.)
(Or you can use "test-wnck" from the libwnck CVS module to
unminimize, but it's not much of a UI ;-)
- Metacity uses the new window manager spec, but only random bits of

View File

@ -707,9 +707,9 @@ process_tab_grab (MetaDisplay *display,
meta_verbose ("Ending grab early so we can focus the target window\n");
meta_display_end_grab_op (display, event->xkey.time);
meta_verbose ("Focusing target window\n");
meta_window_raise (target_window);
meta_window_focus (target_window, event->xkey.time);
meta_verbose ("Activating target window\n");
meta_window_activate (target_window, event->xkey.time);
return TRUE; /* we already ended the grab */
}

View File

@ -116,6 +116,7 @@ static char* get_utf8_property (MetaDisplay *display,
Atom atom);
void meta_window_unqueue_calc_showing (MetaWindow *window);
void meta_window_flush_calc_showing (MetaWindow *window);
static void meta_window_apply_session_info (MetaWindow *window,
const MetaWindowSessionInfo *info);
@ -956,6 +957,16 @@ meta_window_unqueue_calc_showing (MetaWindow *window)
}
}
void
meta_window_flush_calc_showing (MetaWindow *window)
{
if (window->calc_showing_queued)
{
meta_window_unqueue_calc_showing (window);
meta_window_calc_showing (window);
}
}
void
meta_window_queue_calc_showing (MetaWindow *window)
{
@ -1196,6 +1207,22 @@ meta_window_unshade (MetaWindow *window)
}
}
void
meta_window_activate (MetaWindow *window,
guint32 timestamp)
{
/* Get window on current workspace */
if (!meta_window_visible_on_workspace (window,
window->screen->active_workspace))
meta_window_change_workspace (window,
window->screen->active_workspace);
if (window->minimized)
meta_window_unminimize (window);
meta_window_raise (window);
meta_window_focus (window, timestamp);
}
/* returns values suitable for meta_window_move */
static void
@ -1914,6 +1941,8 @@ meta_window_focus (MetaWindow *window,
window->display->grab_window->desc, window->desc);
return;
}
meta_window_flush_calc_showing (window);
/* For output-only or shaded windows, focus the frame.
* This seems to result in the client window getting key events
@ -2486,14 +2515,7 @@ meta_window_client_message (MetaWindow *window,
{
meta_verbose ("_NET_ACTIVE_WINDOW request for window '%s'", window->desc);
/* Get window on current workspace */
if (!meta_window_visible_on_workspace (window,
window->screen->active_workspace))
meta_window_change_workspace (window,
window->screen->active_workspace);
meta_window_raise (window);
meta_window_focus (window, CurrentTime); /* FIXME CurrentTime */
meta_window_activate (window, CurrentTime);
return TRUE;
}

View File

@ -242,6 +242,9 @@ void meta_window_change_workspace (MetaWindow *window,
void meta_window_stick (MetaWindow *window);
void meta_window_unstick (MetaWindow *window);
void meta_window_activate (MetaWindow *window,
guint32 current_time);
/* args to move are window pos, not frame pos */
void meta_window_move (MetaWindow *window,
gboolean user_op,