draw animation for shading too

2001-08-06  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_shade): draw animation
	for shading too
This commit is contained in:
Havoc Pennington 2001-08-06 04:43:31 +00:00 committed by rhp
parent 971419c880
commit 47ce823aa5
5 changed files with 33 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2001-08-06 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_shade): draw animation
for shading too
2001-08-05 Anders Carlsson <andersca@gnu.org>
* src/display.h, src/display.c: Add _NET_WM_ICON_GEOMETRY atom.

7
README
View File

@ -123,6 +123,10 @@ METACITY FEATURES
- Uses Pango to render text, so has cool i18n capabilities.
Supports UTF-8 window titles and such.
- There are simple animations for actions such as minimization,
to help users see what is happening. Should probably
have a few more of these.
METACITY BUGS, NON-FEATURES, AND CAVEATS
===
@ -167,9 +171,6 @@ METACITY BUGS, NON-FEATURES, AND CAVEATS
another. (But sometimes I don't see the flicker, so
I'm not sure.)
- Various operations, such as minimize, maximize, etc., should
have simple animations to make them clearer to users.
- I haven't even read the ICCCM section about colormaps. So if you
have an 8-bit display you are basically screwed.

View File

@ -2,7 +2,7 @@ AC_INIT(src/display.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(metacity, 2.3.2)
AM_INIT_AUTOMAKE(metacity, 2.3.3)
GETTEXT_PACKAGE=metacity
AC_SUBST(GETTEXT_PACKAGE)

View File

@ -28,6 +28,9 @@
#define META_MINIMIZE_ANIMATION_STEPS 16
#define META_MINIMIZE_ANIMATION_DELAY 20
#define META_SHADE_ANIMATION_STEPS 7
#define META_SHADE_ANIMATION_DELAY 15
void meta_effects_draw_box_animation (MetaScreen *screen,
MetaRectangle *initial_rect,
MetaRectangle *destination_rect,

View File

@ -1064,6 +1064,24 @@ meta_window_shade (MetaWindow *window)
meta_verbose ("Shading %s\n", window->desc);
if (!window->shaded)
{
{
/* Animation */
MetaRectangle starting_size;
MetaRectangle titlebar_size;
meta_window_get_outer_rect (window, &starting_size);
if (window->frame)
starting_size.y += window->frame->child_y;
titlebar_size = starting_size;
titlebar_size.height = 0;
meta_effects_draw_box_animation (window->screen,
&starting_size,
&titlebar_size,
META_SHADE_ANIMATION_STEPS,
META_SHADE_ANIMATION_DELAY);
}
window->shaded = TRUE;
meta_window_focus (window, CurrentTime);