bell: add a composited flash-screen function

The old bell_flash_screen() has no effect when compositing. Add
meta_compositor_flash_screen(), and use that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=639765
This commit is contained in:
Dan Winship
2011-03-18 09:36:28 -04:00
parent 9f39a18fc5
commit 3597035f67
3 changed files with 58 additions and 3 deletions

View File

@ -149,7 +149,7 @@ bell_flash_screen (MetaDisplay *display,
#ifdef HAVE_XKB
static void
bell_flash_fullscreen (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
XkbAnyEvent *xkb_ev)
{
XkbBellNotifyEvent *xkb_bell_ev = (XkbBellNotifyEvent *) xkb_ev;
MetaScreen *screen;
@ -159,7 +159,12 @@ bell_flash_fullscreen (MetaDisplay *display,
{
screen = meta_display_screen_for_xwindow (display, xkb_bell_ev->window);
if (screen)
bell_flash_screen (display, screen);
{
if (display->compositor)
meta_compositor_flash_screen (display->compositor, screen);
else
bell_flash_screen (display, screen);
}
}
else
{
@ -167,7 +172,10 @@ bell_flash_fullscreen (MetaDisplay *display,
while (screen_list)
{
screen = (MetaScreen *) screen_list->data;
bell_flash_screen (display, screen);
if (display->compositor)
meta_compositor_flash_screen (display->compositor, screen);
else
bell_flash_screen (display, screen);
screen_list = screen_list->next;
}
}