remove meta_ prefix on all static functions.
2008-06-29 Thomas Thurman <tthurman@gnome.org> * src/core/bell.c: remove meta_ prefix on all static functions. svn path=/trunk/; revision=3774
This commit is contained in:
parent
c05e6d079c
commit
a1a030e418
@ -1,3 +1,7 @@
|
|||||||
|
2008-06-29 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
|
* src/core/bell.c: remove meta_ prefix on all static functions.
|
||||||
|
|
||||||
2008-06-29 Thomas Thurman <tthurman@gnome.org>
|
2008-06-29 Thomas Thurman <tthurman@gnome.org>
|
||||||
|
|
||||||
* src/core/stack.c (stack_sync_to_server): lose meta prefix
|
* src/core/stack.c (stack_sync_to_server): lose meta prefix
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file core/bell.c Ring the bell or flash the screen
|
* \file bell.c Ring the bell or flash the screen
|
||||||
*
|
*
|
||||||
* Sometimes, X programs "ring the bell", whatever that means. Metacity lets
|
* Sometimes, X programs "ring the bell", whatever that means. Metacity lets
|
||||||
* the user configure the bell to be audible or visible (aka visual), and
|
* the user configure the bell to be audible or visible (aka visual), and
|
||||||
@ -31,13 +31,13 @@
|
|||||||
* We never get told about audible bells; X handles them just fine by itself.
|
* We never get told about audible bells; X handles them just fine by itself.
|
||||||
*
|
*
|
||||||
* Visual bells come in at meta_bell_notify(), which checks we are actually
|
* Visual bells come in at meta_bell_notify(), which checks we are actually
|
||||||
* in visual mode and calls through to meta_bell_visual_notify(). That
|
* in visual mode and calls through to bell_visual_notify(). That
|
||||||
* function then checks what kind of visual flash you like, and calls either
|
* function then checks what kind of visual flash you like, and calls either
|
||||||
* meta_bell_flash_fullscreen()-- which calls meta_bell_flash_screen() to do
|
* bell_flash_fullscreen()-- which calls bell_flash_screen() to do
|
||||||
* its work-- or meta_bell_flash_frame(), which flashes the focussed window
|
* its work-- or bell_flash_frame(), which flashes the focussed window
|
||||||
* using meta_bell_flash_window_frame(), unless there is no such window, in
|
* using bell_flash_window_frame(), unless there is no such window, in
|
||||||
* which case it flashes the screen instead. meta_bell_flash_window_frame()
|
* which case it flashes the screen instead. bell_flash_window_frame()
|
||||||
* flashes the frame and calls meta_bell_unflash_frame() as a timeout to
|
* flashes the frame and calls bell_unflash_frame() as a timeout to
|
||||||
* remove the flash.
|
* remove the flash.
|
||||||
*
|
*
|
||||||
* The visual bell was the result of a discussion in Bugzilla here:
|
* The visual bell was the result of a discussion in Bugzilla here:
|
||||||
@ -46,8 +46,6 @@
|
|||||||
* Several of the functions in this file are ifdeffed out entirely if we are
|
* Several of the functions in this file are ifdeffed out entirely if we are
|
||||||
* found not to have the XKB extension, which is required to do these clever
|
* found not to have the XKB extension, which is required to do these clever
|
||||||
* things with bells; some others are entirely no-ops in that case.
|
* things with bells; some others are entirely no-ops in that case.
|
||||||
*
|
|
||||||
* \bug Static functions should not be called meta_*.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@ -74,7 +72,7 @@
|
|||||||
* \bug This appears to destroy our current XSync status.
|
* \bug This appears to destroy our current XSync status.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
meta_bell_flash_screen (MetaDisplay *display,
|
bell_flash_screen (MetaDisplay *display,
|
||||||
MetaScreen *screen)
|
MetaScreen *screen)
|
||||||
{
|
{
|
||||||
Window root = screen->xroot;
|
Window root = screen->xroot;
|
||||||
@ -147,7 +145,7 @@ meta_bell_flash_screen (MetaDisplay *display,
|
|||||||
*/
|
*/
|
||||||
#ifdef HAVE_XKB
|
#ifdef HAVE_XKB
|
||||||
static void
|
static void
|
||||||
meta_bell_flash_fullscreen (MetaDisplay *display,
|
bell_flash_fullscreen (MetaDisplay *display,
|
||||||
XkbAnyEvent *xkb_ev)
|
XkbAnyEvent *xkb_ev)
|
||||||
{
|
{
|
||||||
XkbBellNotifyEvent *xkb_bell_ev = (XkbBellNotifyEvent *) xkb_ev;
|
XkbBellNotifyEvent *xkb_bell_ev = (XkbBellNotifyEvent *) xkb_ev;
|
||||||
@ -158,7 +156,7 @@ meta_bell_flash_fullscreen (MetaDisplay *display,
|
|||||||
{
|
{
|
||||||
screen = meta_display_screen_for_xwindow (display, xkb_bell_ev->window);
|
screen = meta_display_screen_for_xwindow (display, xkb_bell_ev->window);
|
||||||
if (screen)
|
if (screen)
|
||||||
meta_bell_flash_screen (display, screen);
|
bell_flash_screen (display, screen);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -166,7 +164,7 @@ meta_bell_flash_fullscreen (MetaDisplay *display,
|
|||||||
while (screen_list)
|
while (screen_list)
|
||||||
{
|
{
|
||||||
screen = (MetaScreen *) screen_list->data;
|
screen = (MetaScreen *) screen_list->data;
|
||||||
meta_bell_flash_screen (display, screen);
|
bell_flash_screen (display, screen);
|
||||||
screen_list = screen_list->next;
|
screen_list = screen_list->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,7 +172,7 @@ meta_bell_flash_fullscreen (MetaDisplay *display,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes a frame be not flashed; this is the timeout half of
|
* Makes a frame be not flashed; this is the timeout half of
|
||||||
* meta_bell_flash_window_frame(). This is done simply by clearing the
|
* bell_flash_window_frame(). This is done simply by clearing the
|
||||||
* flash flag and queuing a redraw of the frame.
|
* flash flag and queuing a redraw of the frame.
|
||||||
*
|
*
|
||||||
* If the configure script found we had no XKB, this does not exist.
|
* If the configure script found we had no XKB, this does not exist.
|
||||||
@ -183,11 +181,11 @@ meta_bell_flash_fullscreen (MetaDisplay *display,
|
|||||||
* a callback function.
|
* a callback function.
|
||||||
* \return Always FALSE, so we don't get called again.
|
* \return Always FALSE, so we don't get called again.
|
||||||
*
|
*
|
||||||
* \bug This is the parallel to meta_bell_flash_window_frame(), so it should
|
* \bug This is the parallel to bell_flash_window_frame(), so it should
|
||||||
* really be called meta_bell_unflash_window_frame().
|
* really be called meta_bell_unflash_window_frame().
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
meta_bell_unflash_frame (gpointer data)
|
bell_unflash_frame (gpointer data)
|
||||||
{
|
{
|
||||||
MetaFrame *frame = (MetaFrame *) data;
|
MetaFrame *frame = (MetaFrame *) data;
|
||||||
frame->is_flashing = 0;
|
frame->is_flashing = 0;
|
||||||
@ -207,13 +205,13 @@ meta_bell_unflash_frame (gpointer data)
|
|||||||
* \param window The window to flash
|
* \param window The window to flash
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
meta_bell_flash_window_frame (MetaWindow *window)
|
bell_flash_window_frame (MetaWindow *window)
|
||||||
{
|
{
|
||||||
g_assert (window->frame != NULL);
|
g_assert (window->frame != NULL);
|
||||||
window->frame->is_flashing = 1;
|
window->frame->is_flashing = 1;
|
||||||
meta_frame_queue_draw (window->frame);
|
meta_frame_queue_draw (window->frame);
|
||||||
g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 100,
|
g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 100,
|
||||||
meta_bell_unflash_frame, window->frame, NULL);
|
bell_unflash_frame, window->frame, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -224,7 +222,7 @@ meta_bell_flash_window_frame (MetaWindow *window)
|
|||||||
* \param xkb_ev The bell event we just received
|
* \param xkb_ev The bell event we just received
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
meta_bell_flash_frame (MetaDisplay *display,
|
bell_flash_frame (MetaDisplay *display,
|
||||||
XkbAnyEvent *xkb_ev)
|
XkbAnyEvent *xkb_ev)
|
||||||
{
|
{
|
||||||
XkbBellNotifyEvent *xkb_bell_event = (XkbBellNotifyEvent *) xkb_ev;
|
XkbBellNotifyEvent *xkb_bell_event = (XkbBellNotifyEvent *) xkb_ev;
|
||||||
@ -238,11 +236,11 @@ meta_bell_flash_frame (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
if (window)
|
if (window)
|
||||||
{
|
{
|
||||||
meta_bell_flash_window_frame (window);
|
bell_flash_window_frame (window);
|
||||||
}
|
}
|
||||||
else /* revert to fullscreen flash if there's no focussed window */
|
else /* revert to fullscreen flash if there's no focussed window */
|
||||||
{
|
{
|
||||||
meta_bell_flash_fullscreen (display, xkb_ev);
|
bell_flash_fullscreen (display, xkb_ev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,16 +256,16 @@ meta_bell_flash_frame (MetaDisplay *display,
|
|||||||
* \bug This should be merged with meta_bell_notify().
|
* \bug This should be merged with meta_bell_notify().
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
meta_bell_visual_notify (MetaDisplay *display,
|
bell_visual_notify (MetaDisplay *display,
|
||||||
XkbAnyEvent *xkb_ev)
|
XkbAnyEvent *xkb_ev)
|
||||||
{
|
{
|
||||||
switch (meta_prefs_get_visual_bell_type ())
|
switch (meta_prefs_get_visual_bell_type ())
|
||||||
{
|
{
|
||||||
case META_VISUAL_BELL_FULLSCREEN_FLASH:
|
case META_VISUAL_BELL_FULLSCREEN_FLASH:
|
||||||
meta_bell_flash_fullscreen (display, xkb_ev);
|
bell_flash_fullscreen (display, xkb_ev);
|
||||||
break;
|
break;
|
||||||
case META_VISUAL_BELL_FRAME_FLASH:
|
case META_VISUAL_BELL_FRAME_FLASH:
|
||||||
meta_bell_flash_frame (display, xkb_ev); /* does nothing yet */
|
bell_flash_frame (display, xkb_ev); /* does nothing yet */
|
||||||
break;
|
break;
|
||||||
case META_VISUAL_BELL_INVALID:
|
case META_VISUAL_BELL_INVALID:
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
@ -291,7 +289,7 @@ meta_bell_notify (MetaDisplay *display,
|
|||||||
{
|
{
|
||||||
/* flash something */
|
/* flash something */
|
||||||
if (meta_prefs_get_visual_bell ())
|
if (meta_prefs_get_visual_bell ())
|
||||||
meta_bell_visual_notify (display, xkb_ev);
|
bell_visual_notify (display, xkb_ev);
|
||||||
}
|
}
|
||||||
#endif /* HAVE_XKB */
|
#endif /* HAVE_XKB */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user