/** * bell_flash_frame: * @display: The display the bell event came in on * @xkb_ev: The bell event we just received * * Flashes the frame of the focused window. If there is no focused window, * flashes the screen. */ static void bell_flash_frame (MetaDisplay *display, MetaWindow *window) { if (window && window->frame) bell_flash_window_frame (window); else bell_flash_fullscreen (display); }
/** * Flashes the frame of the focussed window. If there is no focussed window, * flashes the screen. * * \param display The display the bell event came in on * \param xkb_ev The bell event we just received */ static void bell_flash_frame (MetaDisplay *display, XkbAnyEvent *xkb_ev) { XkbBellNotifyEvent *xkb_bell_event = (XkbBellNotifyEvent *) xkb_ev; MetaWindow *window; g_assert (xkb_ev->xkb_type == XkbBellNotify); window = meta_display_lookup_x_window (display, xkb_bell_event->window); if (!window && (display->focus_window)) { window = display->focus_window; } if (window && window->frame) { bell_flash_window_frame (window); } else /* revert to fullscreen flash if there's no focussed window */ { bell_flash_fullscreen (display, xkb_ev); } }