diff --git a/src/core/display.c b/src/core/display.c index 6db6369a1..ee5c9f0e0 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -5183,3 +5183,10 @@ meta_display_get_shape_event_base (MetaDisplay *display) } #endif #endif + +Atom meta_display_get_atom (MetaDisplay *display, MetaAtom meta_atom) +{ + Atom *atoms = & display->atom_WM_PROTOCOLS; + + return atoms[meta_atom - 1]; +} diff --git a/src/core/atomnames.h b/src/include/atomnames.h similarity index 97% rename from src/core/atomnames.h rename to src/include/atomnames.h index 18e5dcc0a..9b7121684 100644 --- a/src/core/atomnames.h +++ b/src/include/atomnames.h @@ -1,12 +1,12 @@ /* -*- 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 @@ -16,7 +16,7 @@ * 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 @@ -42,7 +42,7 @@ #ifndef EWMH_ATOMS_ONLY -item(WM_PROTOCOLS) +item(WM_PROTOCOLS) /* MUST BE FIRST */ item(WM_TAKE_FOCUS) item(WM_DELETE_WINDOW) item(WM_STATE) @@ -54,7 +54,7 @@ item(WM_WINDOW_ROLE) item(UTF8_STRING) item(WM_ICON_SIZE) item(_KWM_WIN_ICON) -item(_METACITY_RESTART_MESSAGE) +item(_METACITY_RESTART_MESSAGE) item(_METACITY_RELOAD_THEME_MESSAGE) item(_METACITY_SET_KEYBINDINGS_MESSAGE) item(_METACITY_TOGGLE_VERBOSE) @@ -122,6 +122,7 @@ item(_NET_WM_STRUT) item(_NET_WM_STATE_HIDDEN) item(_NET_WM_WINDOW_TYPE_UTILITY) item(_NET_WM_WINDOW_TYPE_SPLASH) +item(_NET_WM_WINDOW_TYPE_DND) item(_NET_WM_STATE_FULLSCREEN) item(_NET_WM_PING) item(_NET_WM_PID) diff --git a/src/include/display.h b/src/include/display.h index 53dd9d758..69579dde1 100644 --- a/src/include/display.h +++ b/src/include/display.h @@ -29,6 +29,14 @@ #define meta_XFree(p) do { if ((p)) XFree ((p)); } while (0) +typedef enum +{ + META_ATOM_FIRST = 0, +#define item(x) META_ATOM_##x, +#include "atomnames.h" +#undef item +}MetaAtom; + void meta_display_get_compositor_version (MetaDisplay *display, int *major, int *minor); @@ -44,5 +52,6 @@ MetaWindow *meta_display_get_focus_window (MetaDisplay *display); int meta_display_get_damage_event_base (MetaDisplay *display); int meta_display_get_shape_event_base (MetaDisplay *display); +Atom meta_display_get_atom (MetaDisplay *display, MetaAtom meta_atom); #endif