Commit b455ac62 authored by Thomas Thurman's avatar Thomas Thurman Committed by Thomas James Alexander Thurman

All information should live in exactly one place. This means that the list

2008-05-02  Thomas Thurman  <tthurman@gnome.org>

        All information should live in exactly one place.  This means
        that the list of atoms should not be replicated anywhere.
        Therefore, we include it via x-macros.  Closes #530843.

        * src/core/atomnames.h: added list of atom names
        * src/Makefile.am: added reference to new file
        * src/core/display.h
        * src/core/display.c (twice)
        * src/core/screen.c: #included atomnames.h instead of having
          an enormous list of atoms
        * src/core/group-props.c
        * src/core/window.c
        * src/core/compositor.c
        * src/core/window-props.c
        * src/core/delete.c
        * src/core/workspace.c
        * src/core/stack.c
        * src/core/keybindings.c
        * src/core/iconcache.c
        * src/core/group.c
        * src/core/xprops.c: changed to new, simpler identifiers
          for atoms


svn path=/trunk/; revision=3702
parent 4916fedc
2008-05-02 Thomas Thurman <tthurman@gnome.org>
All information should live in exactly one place. This means
that the list of atoms should not be replicated anywhere.
Therefore, we include it via x-macros. Closes #530843.
* src/core/atomnames.h: added list of atom names
* src/Makefile.am: added reference to new file
* src/core/display.h
* src/core/display.c (twice)
* src/core/screen.c: #included atomnames.h instead of having
an enormous list of atoms
* src/core/group-props.c
* src/core/window.c
* src/core/compositor.c
* src/core/window-props.c
* src/core/delete.c
* src/core/workspace.c
* src/core/stack.c
* src/core/keybindings.c
* src/core/iconcache.c
* src/core/group.c
* src/core/xprops.c: changed to new, simpler identifiers
for atoms
2008-04-29 Chris Wang <chris.wang@sun.com>
* src/core/window.c (meta_window_new): XGetWindowAttributes
......
......@@ -7,6 +7,7 @@ INCLUDES=@METACITY_CFLAGS@ -I $(srcdir)/include -DMETACITY_LIBEXECDIR=\"$(libexe
metacity_SOURCES= \
core/async-getprop.c \
core/async-getprop.h \
core/atomnames.h \
core/bell.c \
core/bell.h \
core/boxes.c \
......
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2001 Havoc Pennington
* Copyright (C) 2002, 2003, 2004 Red Hat, Inc.
* Copyright (C) 2003, 2004 Rob Adams
* Copyright (C) 2004-2006 Elijah Newren
* Copyright (C) 2008 Thomas Thurman
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
/**
* \file atomnames.h A list of atom names.
*
* This is a list of the names of all the X atoms that Metacity uses.
* Each is wrapped in a macro "item()" which is undefined here; the
* idea is that when you need to make a big list of all the X atoms,
* you can define item(), include this file, and then undefine it
* again.
*
* If you also define EWMH_ATOMS_ONLY then you will only get _NET_WM_*
* hints rather than all of them.
*/
#ifndef item
#error "item(x) must be defined when you include atomnames.h"
#endif
#ifndef EWMH_ATOMS_ONLY
item(WM_PROTOCOLS)
item(WM_TAKE_FOCUS)
item(WM_DELETE_WINDOW)
item(WM_STATE)
item(_MOTIF_WM_HINTS)
item(WM_CHANGE_STATE)
item(SM_CLIENT_ID)
item(WM_CLIENT_LEADER)
item(WM_WINDOW_ROLE)
item(UTF8_STRING)
item(WM_ICON_SIZE)
item(_KWM_WIN_ICON)
item(_METACITY_RESTART_MESSAGE)
item(_METACITY_RELOAD_THEME_MESSAGE)
item(_METACITY_SET_KEYBINDINGS_MESSAGE)
item(_METACITY_TOGGLE_VERBOSE)
item(_GNOME_PANEL_ACTION)
item(_GNOME_PANEL_ACTION_MAIN_MENU)
item(_GNOME_PANEL_ACTION_RUN_DIALOG)
item(_METACITY_SENTINEL)
item(_METACITY_VERSION)
item(WM_CLIENT_MACHINE)
item(MANAGER)
item(TARGETS)
item(MULTIPLE)
item(TIMESTAMP)
item(VERSION)
item(ATOM_PAIR)
/* Oddities: These are used, and we need atoms for them,
* but when we need all _NET_WM hints (i.e. when we're making
* lists of which _NET_WM hints we support in order to advertise
* it) we haven't historically listed them. I don't know what
* the reason for this is. It may be a bug.
*/
item(_NET_WM_SYNC_REQUEST)
item(_NET_WM_SYNC_REQUEST_COUNTER)
item(_NET_WM_VISIBLE_NAME)
item(_NET_WM_VISIBLE_ICON_NAME)
item(_NET_SUPPORTING_WM_CHECK)
/* But I suppose it's quite reasonable not to advertise using
* _NET_SUPPORTED that we support _NET_SUPPORTED :)
*/
item(_NET_SUPPORTED)
#endif /* !EWMH_ATOMS_ONLY */
/**************************************************************************/
item(_NET_WM_NAME)
item(_NET_CLOSE_WINDOW)
item(_NET_WM_STATE)
item(_NET_WM_STATE_SHADED)
item(_NET_WM_STATE_MAXIMIZED_HORZ)
item(_NET_WM_STATE_MAXIMIZED_VERT)
item(_NET_WM_DESKTOP)
item(_NET_NUMBER_OF_DESKTOPS)
item(_NET_CURRENT_DESKTOP)
item(_NET_WM_WINDOW_TYPE)
item(_NET_WM_WINDOW_TYPE_DESKTOP)
item(_NET_WM_WINDOW_TYPE_DOCK)
item(_NET_WM_WINDOW_TYPE_TOOLBAR)
item(_NET_WM_WINDOW_TYPE_MENU)
item(_NET_WM_WINDOW_TYPE_DIALOG)
item(_NET_WM_WINDOW_TYPE_NORMAL)
item(_NET_WM_STATE_MODAL)
item(_NET_CLIENT_LIST)
item(_NET_CLIENT_LIST_STACKING)
item(_NET_WM_STATE_SKIP_TASKBAR)
item(_NET_WM_STATE_SKIP_PAGER)
item(_NET_WM_ICON_NAME)
item(_NET_WM_ICON)
item(_NET_WM_ICON_GEOMETRY)
item(_NET_WM_MOVERESIZE)
item(_NET_ACTIVE_WINDOW)
item(_NET_WM_STRUT)
item(_NET_WM_STATE_HIDDEN)
item(_NET_WM_WINDOW_TYPE_UTILITY)
item(_NET_WM_WINDOW_TYPE_SPLASH)
item(_NET_WM_STATE_FULLSCREEN)
item(_NET_WM_PING)
item(_NET_WM_PID)
item(_NET_WORKAREA)
item(_NET_SHOWING_DESKTOP)
item(_NET_DESKTOP_LAYOUT)
item(_NET_DESKTOP_NAMES)
item(_NET_WM_ALLOWED_ACTIONS)
item(_NET_WM_ACTION_MOVE)
item(_NET_WM_ACTION_RESIZE)
item(_NET_WM_ACTION_SHADE)
item(_NET_WM_ACTION_STICK)
item(_NET_WM_ACTION_MAXIMIZE_HORZ)
item(_NET_WM_ACTION_MAXIMIZE_VERT)
item(_NET_WM_ACTION_CHANGE_DESKTOP)
item(_NET_WM_ACTION_CLOSE)
item(_NET_WM_STATE_ABOVE)
item(_NET_WM_STATE_BELOW)
item(_NET_STARTUP_ID)
item(_NET_WM_STRUT_PARTIAL)
item(_NET_WM_ACTION_FULLSCREEN)
item(_NET_WM_ACTION_MINIMIZE)
item(_NET_FRAME_EXTENTS)
item(_NET_REQUEST_FRAME_EXTENTS)
item(_NET_WM_USER_TIME)
item(_NET_WM_STATE_DEMANDS_ATTENTION)
item(_NET_MOVERESIZE_WINDOW)
item(_NET_DESKTOP_GEOMETRY)
item(_NET_DESKTOP_VIEWPORT)
item(_NET_WM_USER_TIME_WINDOW)
item(_NET_WM_ACTION_ABOVE)
item(_NET_WM_ACTION_BELOW)
#if 0
/* We apparently never use: */
/* item(_NET_RESTACK_WINDOW) */
#endif
/* eof atomnames.h */
......@@ -1675,20 +1675,20 @@ get_window_type (MetaDisplay *display,
atoms = NULL;
meta_prop_get_atom_list (display, cw->id,
display->atom_net_wm_window_type,
display->atom__NET_WM_WINDOW_TYPE,
&atoms, &n_atoms);
for (i = 0; i < n_atoms; i++)
{
if (atoms[i] == compositor->atom_net_wm_window_type_dnd ||
atoms[i] == display->atom_net_wm_window_type_desktop ||
atoms[i] == display->atom_net_wm_window_type_dock ||
atoms[i] == display->atom_net_wm_window_type_toolbar ||
atoms[i] == display->atom_net_wm_window_type_menu ||
atoms[i] == display->atom_net_wm_window_type_dialog ||
atoms[i] == display->atom_net_wm_window_type_normal ||
atoms[i] == display->atom_net_wm_window_type_utility ||
atoms[i] == display->atom_net_wm_window_type_splash)
atoms[i] == display->atom__NET_WM_WINDOW_TYPE_DESKTOP ||
atoms[i] == display->atom__NET_WM_WINDOW_TYPE_DOCK ||
atoms[i] == display->atom__NET_WM_WINDOW_TYPE_TOOLBAR ||
atoms[i] == display->atom__NET_WM_WINDOW_TYPE_MENU ||
atoms[i] == display->atom__NET_WM_WINDOW_TYPE_DIALOG ||
atoms[i] == display->atom__NET_WM_WINDOW_TYPE_NORMAL ||
atoms[i] == display->atom__NET_WM_WINDOW_TYPE_UTILITY ||
atoms[i] == display->atom__NET_WM_WINDOW_TYPE_SPLASH)
{
type_atom = atoms[i];
break;
......@@ -1699,9 +1699,9 @@ get_window_type (MetaDisplay *display,
if (type_atom == compositor->atom_net_wm_window_type_dnd)
cw->type = META_COMP_WINDOW_DND;
else if (type_atom == display->atom_net_wm_window_type_desktop)
else if (type_atom == display->atom__NET_WM_WINDOW_TYPE_DESKTOP)
cw->type = META_COMP_WINDOW_DESKTOP;
else if (type_atom == display->atom_net_wm_window_type_dock)
else if (type_atom == display->atom__NET_WM_WINDOW_TYPE_DOCK)
cw->type = META_COMP_WINDOW_DOCK;
else
cw->type = META_COMP_WINDOW_NORMAL;
......@@ -2173,7 +2173,7 @@ process_property_notify (MetaCompositor *compositor,
return;
}
if (event->atom == display->atom_net_wm_window_type) {
if (event->atom == display->atom__NET_WM_WINDOW_TYPE) {
MetaCompWindow *cw = find_window_in_display (display, event->window);
if (!cw)
......
......@@ -365,7 +365,7 @@ meta_window_delete (MetaWindow *window,
"Deleting %s with delete_window request\n",
window->desc);
meta_window_send_icccm_message (window,
window->display->atom_wm_delete_window,
window->display->atom_WM_DELETE_WINDOW,
timestamp);
}
else
......
......@@ -306,10 +306,6 @@ disable_compositor (MetaDisplay *display)
* otherwise-- that is, if the display doesn't exist or it already
* has a window manager.
*
* \bug The list of atom_names is prone to get out of sync with the
* main list; I'd rather include them in that list using the stringify
* operator or something.
*
* \ingroup main
*/
gboolean
......@@ -320,107 +316,12 @@ meta_display_open (void)
GSList *tmp;
int i;
guint32 timestamp;
/* Remember to edit code that assigns each atom to display struct
* when adding an atom name here.
*/
/* A list of all atom names, so that we can intern them in one go. */
char *atom_names[] = {
"_NET_WM_NAME",
"WM_PROTOCOLS",
"WM_TAKE_FOCUS",
"WM_DELETE_WINDOW",
"WM_STATE",
"_NET_CLOSE_WINDOW",
"_NET_WM_STATE",
"_MOTIF_WM_HINTS",
"_NET_WM_STATE_SHADED",
"_NET_WM_STATE_MAXIMIZED_HORZ",
"_NET_WM_STATE_MAXIMIZED_VERT",
"_NET_WM_DESKTOP",
"_NET_NUMBER_OF_DESKTOPS",
"WM_CHANGE_STATE",
"SM_CLIENT_ID",
"WM_CLIENT_LEADER",
"WM_WINDOW_ROLE",
"_NET_CURRENT_DESKTOP",
"_NET_SUPPORTING_WM_CHECK",
"_NET_SUPPORTED",
"_NET_WM_WINDOW_TYPE",
"_NET_WM_WINDOW_TYPE_DESKTOP",
"_NET_WM_WINDOW_TYPE_DOCK",
"_NET_WM_WINDOW_TYPE_TOOLBAR",
"_NET_WM_WINDOW_TYPE_MENU",
"_NET_WM_WINDOW_TYPE_DIALOG",
"_NET_WM_WINDOW_TYPE_NORMAL",
"_NET_WM_STATE_MODAL",
"_NET_CLIENT_LIST",
"_NET_CLIENT_LIST_STACKING",
"_NET_WM_STATE_SKIP_TASKBAR",
"_NET_WM_STATE_SKIP_PAGER",
"_NET_WM_ICON_NAME",
"_NET_WM_ICON",
"_NET_WM_ICON_GEOMETRY",
"UTF8_STRING",
"WM_ICON_SIZE",
"_KWM_WIN_ICON",
"_NET_WM_MOVERESIZE",
"_NET_ACTIVE_WINDOW",
"_METACITY_RESTART_MESSAGE",
"_NET_WM_STRUT",
"_METACITY_RELOAD_THEME_MESSAGE",
"_METACITY_SET_KEYBINDINGS_MESSAGE",
"_NET_WM_STATE_HIDDEN",
"_NET_WM_WINDOW_TYPE_UTILITY",
"_NET_WM_WINDOW_TYPE_SPLASH",
"_NET_WM_STATE_FULLSCREEN",
"_NET_WM_PING",
"_NET_WM_PID",
"WM_CLIENT_MACHINE",
"_NET_WORKAREA",
"_NET_SHOWING_DESKTOP",
"_NET_DESKTOP_LAYOUT",
"MANAGER",
"TARGETS",
"MULTIPLE",
"TIMESTAMP",
"VERSION",
"ATOM_PAIR",
"_NET_DESKTOP_NAMES",
"_NET_WM_ALLOWED_ACTIONS",
"_NET_WM_ACTION_MOVE",
"_NET_WM_ACTION_RESIZE",
"_NET_WM_ACTION_SHADE",
"_NET_WM_ACTION_STICK",
"_NET_WM_ACTION_MAXIMIZE_HORZ",
"_NET_WM_ACTION_MAXIMIZE_VERT",
"_NET_WM_ACTION_CHANGE_DESKTOP",
"_NET_WM_ACTION_CLOSE",
"_NET_WM_STATE_ABOVE",
"_NET_WM_STATE_BELOW",
"_NET_STARTUP_ID",
"_METACITY_TOGGLE_VERBOSE",
"_NET_WM_SYNC_REQUEST",
"_NET_WM_SYNC_REQUEST_COUNTER",
"_GNOME_PANEL_ACTION",
"_GNOME_PANEL_ACTION_MAIN_MENU",
"_GNOME_PANEL_ACTION_RUN_DIALOG",
"_METACITY_SENTINEL",
"_NET_WM_STRUT_PARTIAL",
"_NET_WM_ACTION_FULLSCREEN",
"_NET_WM_ACTION_MINIMIZE",
"_NET_FRAME_EXTENTS",
"_NET_REQUEST_FRAME_EXTENTS",
"_NET_WM_USER_TIME",
"_NET_WM_STATE_DEMANDS_ATTENTION",
"_NET_RESTACK_WINDOW",
"_NET_MOVERESIZE_WINDOW",
"_NET_DESKTOP_GEOMETRY",
"_NET_DESKTOP_VIEWPORT",
"_METACITY_VERSION",
"_NET_WM_VISIBLE_NAME",
"_NET_WM_VISIBLE_ICON_NAME",
"_NET_WM_USER_TIME_WINDOW",
"_NET_WM_ACTION_ABOVE",
"_NET_WM_ACTION_BELOW",
#define item(x) #x,
#include "atomnames.h"
#undef item
};
Atom atoms[G_N_ELEMENTS(atom_names)];
......@@ -484,103 +385,12 @@ meta_display_open (void)
meta_verbose ("Creating %d atoms\n", (int) G_N_ELEMENTS (atom_names));
XInternAtoms (the_display->xdisplay, atom_names, G_N_ELEMENTS (atom_names),
False, atoms);
the_display->atom_net_wm_name = atoms[0];
the_display->atom_wm_protocols = atoms[1];
the_display->atom_wm_take_focus = atoms[2];
the_display->atom_wm_delete_window = atoms[3];
the_display->atom_wm_state = atoms[4];
the_display->atom_net_close_window = atoms[5];
the_display->atom_net_wm_state = atoms[6];
the_display->atom_motif_wm_hints = atoms[7];
the_display->atom_net_wm_state_shaded = atoms[8];
the_display->atom_net_wm_state_maximized_horz = atoms[9];
the_display->atom_net_wm_state_maximized_vert = atoms[10];
the_display->atom_net_wm_desktop = atoms[11];
the_display->atom_net_number_of_desktops = atoms[12];
the_display->atom_wm_change_state = atoms[13];
the_display->atom_sm_client_id = atoms[14];
the_display->atom_wm_client_leader = atoms[15];
the_display->atom_wm_window_role = atoms[16];
the_display->atom_net_current_desktop = atoms[17];
the_display->atom_net_supporting_wm_check = atoms[18];
the_display->atom_net_supported = atoms[19];
the_display->atom_net_wm_window_type = atoms[20];
the_display->atom_net_wm_window_type_desktop = atoms[21];
the_display->atom_net_wm_window_type_dock = atoms[22];
the_display->atom_net_wm_window_type_toolbar = atoms[23];
the_display->atom_net_wm_window_type_menu = atoms[24];
the_display->atom_net_wm_window_type_dialog = atoms[25];
the_display->atom_net_wm_window_type_normal = atoms[26];
the_display->atom_net_wm_state_modal = atoms[27];
the_display->atom_net_client_list = atoms[28];
the_display->atom_net_client_list_stacking = atoms[29];
the_display->atom_net_wm_state_skip_taskbar = atoms[30];
the_display->atom_net_wm_state_skip_pager = atoms[31];
the_display->atom_net_wm_icon_name = atoms[32];
the_display->atom_net_wm_icon = atoms[33];
the_display->atom_net_wm_icon_geometry = atoms[34];
the_display->atom_utf8_string = atoms[35];
the_display->atom_wm_icon_size = atoms[36];
the_display->atom_kwm_win_icon = atoms[37];
the_display->atom_net_wm_moveresize = atoms[38];
the_display->atom_net_active_window = atoms[39];
the_display->atom_metacity_restart_message = atoms[40];
the_display->atom_net_wm_strut = atoms[41];
the_display->atom_metacity_reload_theme_message = atoms[42];
the_display->atom_metacity_set_keybindings_message = atoms[43];
the_display->atom_net_wm_state_hidden = atoms[44];
the_display->atom_net_wm_window_type_utility = atoms[45];
the_display->atom_net_wm_window_type_splash = atoms[46];
the_display->atom_net_wm_state_fullscreen = atoms[47];
the_display->atom_net_wm_ping = atoms[48];
the_display->atom_net_wm_pid = atoms[49];
the_display->atom_wm_client_machine = atoms[50];
the_display->atom_net_workarea = atoms[51];
the_display->atom_net_showing_desktop = atoms[52];
the_display->atom_net_desktop_layout = atoms[53];
the_display->atom_manager = atoms[54];
the_display->atom_targets = atoms[55];
the_display->atom_multiple = atoms[56];
the_display->atom_timestamp = atoms[57];
the_display->atom_version = atoms[58];
the_display->atom_atom_pair = atoms[59];
the_display->atom_net_desktop_names = atoms[60];
the_display->atom_net_wm_allowed_actions = atoms[61];
the_display->atom_net_wm_action_move = atoms[62];
the_display->atom_net_wm_action_resize = atoms[63];
the_display->atom_net_wm_action_shade = atoms[64];
the_display->atom_net_wm_action_stick = atoms[65];
the_display->atom_net_wm_action_maximize_horz = atoms[66];
the_display->atom_net_wm_action_maximize_vert = atoms[67];
the_display->atom_net_wm_action_change_desktop = atoms[68];
the_display->atom_net_wm_action_close = atoms[69];
the_display->atom_net_wm_state_above = atoms[70];
the_display->atom_net_wm_state_below = atoms[71];
the_display->atom_net_startup_id = atoms[72];
the_display->atom_metacity_toggle_verbose = atoms[73];
the_display->atom_net_wm_sync_request = atoms[74];
the_display->atom_net_wm_sync_request_counter = atoms[75];
the_display->atom_gnome_panel_action = atoms[76];
the_display->atom_gnome_panel_action_main_menu = atoms[77];
the_display->atom_gnome_panel_action_run_dialog = atoms[78];
the_display->atom_metacity_sentinel = atoms[79];
the_display->atom_net_wm_strut_partial = atoms[80];
the_display->atom_net_wm_action_fullscreen = atoms[81];
the_display->atom_net_wm_action_minimize = atoms[82];
the_display->atom_net_frame_extents = atoms[83];
the_display->atom_net_request_frame_extents = atoms[84];
the_display->atom_net_wm_user_time = atoms[85];
the_display->atom_net_wm_state_demands_attention = atoms[86];
the_display->atom_net_restack_window = atoms[87];
the_display->atom_net_moveresize_window = atoms[88];
the_display->atom_net_desktop_geometry = atoms[89];
the_display->atom_net_desktop_viewport = atoms[90];
the_display->atom_metacity_version = atoms[91];
the_display->atom_net_wm_visible_name = atoms[92];
the_display->atom_net_wm_visible_icon_name = atoms[93];
the_display->atom_net_wm_user_time_window = atoms[94];
the_display->atom_net_wm_action_above = atoms[95];
the_display->atom_net_wm_action_below = atoms[96];
{
int i = 0;
#define item(x) the_display->atom_##x = atoms[i++];
#include "atomnames.h"
#undef item
}
the_display->prop_hooks = NULL;
meta_display_init_window_prop_hooks (the_display);
......@@ -839,18 +649,18 @@ meta_display_open (void)
meta_prop_set_utf8_string_hint (the_display,
the_display->leader_window,
the_display->atom_net_wm_name,
the_display->atom__NET_WM_NAME,
"Metacity");
meta_prop_set_utf8_string_hint (the_display,
the_display->leader_window,
the_display->atom_metacity_version,
the_display->atom__METACITY_VERSION,
VERSION);
data[0] = the_display->leader_window;
XChangeProperty (the_display->xdisplay,
the_display->leader_window,
the_display->atom_net_supporting_wm_check,
the_display->atom__NET_SUPPORTING_WM_CHECK,
XA_WINDOW,
32, PropModeReplace, (guchar*) data, 1);
......@@ -2345,14 +2155,14 @@ event_callback (XEvent *event,
if (screen != NULL)
{
if (event->xproperty.atom ==
display->atom_net_desktop_layout)
display->atom__NET_DESKTOP_LAYOUT)
meta_screen_update_workspace_layout (screen);
else if (event->xproperty.atom ==
display->atom_net_desktop_names)
display->atom__NET_DESKTOP_NAMES)
meta_screen_update_workspace_names (screen);
#if 0
else if (event->xproperty.atom ==
display->atom_net_restack_window)
display->atom__NET_RESTACK_WINDOW)
handle_net_restack_window (display, event);
#endif
......@@ -2361,7 +2171,7 @@ event_callback (XEvent *event,
* sentinel_counter variable declaration in display.h
*/
if (event->xproperty.atom ==
display->atom_metacity_sentinel)
display->atom__METACITY_SENTINEL)
{
meta_display_decrement_focus_sentinel (display);
}
......@@ -2408,7 +2218,7 @@ event_callback (XEvent *event,
if (screen)
{
if (event->xclient.message_type ==
display->atom_net_current_desktop)
display->atom__NET_CURRENT_DESKTOP)
{
int space;
MetaWorkspace *workspace;
......@@ -2440,7 +2250,7 @@ event_callback (XEvent *event,
meta_verbose ("Don't know about workspace %d\n", space);
}
else if (event->xclient.message_type ==
display->atom_net_number_of_desktops)
display->atom__NET_NUMBER_OF_DESKTOPS)
{
int num_spaces;
......@@ -2452,7 +2262,7 @@ event_callback (XEvent *event,
meta_prefs_set_num_workspaces (num_spaces);
}
else if (event->xclient.message_type ==
display->atom_net_showing_desktop)
display->atom__NET_SHOWING_DESKTOP)
{
gboolean showing_desktop;
guint32 timestamp;
......@@ -2472,13 +2282,13 @@ event_callback (XEvent *event,
}
}
else if (event->xclient.message_type ==
display->atom_metacity_restart_message)
display->atom__METACITY_RESTART_MESSAGE)
{
meta_verbose ("Received restart request\n");
meta_restart ();
}
else if (event->xclient.message_type ==
display->atom_metacity_reload_theme_message)
display->atom__METACITY_RELOAD_THEME_MESSAGE)
{
meta_verbose ("Received reload theme request\n");
meta_ui_set_current_theme (meta_prefs_get_theme (),
......@@ -2486,24 +2296,24 @@ event_callback (XEvent *event,
meta_display_retheme_all ();
}
else if (event->xclient.message_type ==
display->atom_metacity_set_keybindings_message)
display->atom__METACITY_SET_KEYBINDINGS_MESSAGE)
{
meta_verbose ("Received set keybindings request = %d\n",
(int) event->xclient.data.l[0]);
meta_set_keybindings_disabled (!event->xclient.data.l[0]);
}
else if (event->xclient.message_type ==
display->atom_metacity_toggle_verbose)
display->atom__METACITY_TOGGLE_VERBOSE)
{
meta_verbose ("Received toggle verbose message\n");
meta_set_verbose (!meta_is_verbose ());
}
else if (event->xclient.message_type ==
display->atom_wm_protocols)
display->atom_WM_PROTOCOLS)
{
meta_verbose ("Received WM_PROTOCOLS message\n");
if ((Atom)event->xclient.data.l[0] == display->atom_net_wm_ping)
if ((Atom)event->xclient.data.l[0] == display->atom__NET_WM_PING)
{
process_pong_message (display, event);
......@@ -2517,7 +2327,7 @@ event_callback (XEvent *event,
}
if (event->xclient.message_type ==
display->atom_net_request_frame_extents)
display->atom__NET_REQUEST_FRAME_EXTENTS)
{
meta_verbose ("Received _NET_REQUEST_FRAME_EXTENTS message\n");