2000-03-24 22:23:02 +00:00
|
|
|
/*****************************************************************
|
2003-09-16 19:28:03 +00:00
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
2000-04-06 18:29:04 +00:00
|
|
|
|
2000-03-24 22:23:02 +00:00
|
|
|
Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
2003-09-16 19:28:03 +00:00
|
|
|
Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
|
|
|
|
|
|
|
|
You can Freely distribute this program under the GNU General Public
|
|
|
|
License. See the file "COPYING" for the exact licensing terms.
|
2000-03-24 22:23:02 +00:00
|
|
|
******************************************************************/
|
2003-09-16 19:28:03 +00:00
|
|
|
|
2004-11-09 15:38:33 +00:00
|
|
|
|
1999-08-19 23:26:42 +00:00
|
|
|
#include <qapplication.h>
|
|
|
|
#include "atoms.h"
|
2004-11-09 15:38:33 +00:00
|
|
|
#include <assert.h>
|
1999-08-19 23:26:42 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
namespace KWinInternal
|
1999-08-19 23:26:42 +00:00
|
|
|
{
|
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
Atoms::Atoms()
|
|
|
|
{
|
|
|
|
|
2004-04-16 10:23:42 +00:00
|
|
|
const int max = 50;
|
1999-11-28 20:10:58 +00:00
|
|
|
Atom* atoms[max];
|
|
|
|
char* names[max];
|
|
|
|
Atom atoms_return[max];
|
|
|
|
int n = 0;
|
1999-12-01 22:09:32 +00:00
|
|
|
|
2000-06-08 17:05:51 +00:00
|
|
|
atoms[n] = &kwin_running;
|
|
|
|
names[n++] = (char *) "KWIN_RUNNING";
|
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
atoms[n] = &wm_protocols;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "WM_PROTOCOLS";
|
1999-12-01 22:09:32 +00:00
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
atoms[n] = &wm_delete_window;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "WM_DELETE_WINDOW";
|
1999-12-01 22:09:32 +00:00
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
atoms[n] = &wm_take_focus;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "WM_TAKE_FOCUS";
|
1999-12-01 22:09:32 +00:00
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
atoms[n] = &wm_change_state;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "WM_CHANGE_STATE";
|
1999-12-01 22:09:32 +00:00
|
|
|
|
2001-03-19 15:35:07 +00:00
|
|
|
atoms[n] = &wm_client_leader;
|
|
|
|
names[n++] = (char *) "WM_CLIENT_LEADER";
|
|
|
|
|
2000-04-06 18:29:04 +00:00
|
|
|
atoms[n] = &motif_wm_hints;
|
|
|
|
names[n++] = (char *) "_MOTIF_WM_HINTS";
|
1999-12-01 22:09:32 +00:00
|
|
|
|
|
|
|
atoms[n] = &net_wm_context_help;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "_NET_WM_CONTEXT_HELP";
|
2000-03-24 22:23:02 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
atoms[n] = &net_wm_ping;
|
|
|
|
names[n++] = (char *) "_NET_WM_PING";
|
|
|
|
|
2000-06-24 17:58:10 +00:00
|
|
|
atoms[n] = &kde_wm_change_state;
|
|
|
|
names[n++] = (char *) "_KDE_WM_CHANGE_STATE";
|
2001-03-29 17:21:53 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
atoms[n] = &net_wm_user_time;
|
|
|
|
names[n++] = (char *) "_NET_WM_USER_TIME";
|
|
|
|
atoms[n] = &kde_net_wm_user_creation_time;
|
|
|
|
names[n++] = (char *) "_KDE_NET_WM_USER_CREATION_TIME";
|
2002-02-28 22:11:43 +00:00
|
|
|
|
2003-10-30 10:10:54 +00:00
|
|
|
atoms[n] = &kde_system_tray_embedding;
|
|
|
|
names[n++] = (char*) "_KDE_SYSTEM_TRAY_EMBEDDING";
|
2004-04-16 10:23:42 +00:00
|
|
|
|
|
|
|
atoms[n] = &net_wm_take_activity;
|
|
|
|
names[n++] = (char*) "_NET_WM_TAKE_ACTIVITY";
|
2005-01-15 17:07:48 +00:00
|
|
|
|
|
|
|
atoms[n] = &net_wm_window_opacity;
|
|
|
|
names[n++] = (char*) "_KDE_WM_WINDOW_OPACITY";
|
|
|
|
|
|
|
|
atoms[n] = &net_wm_window_shadow;
|
|
|
|
names[n++] = (char*) "_KDE_WM_WINDOW_SHADOW";
|
2003-10-30 10:10:54 +00:00
|
|
|
|
2005-01-15 17:07:48 +00:00
|
|
|
atoms[n] = &net_wm_window_shade;
|
|
|
|
names[n++] = (char*) "_KDE_WM_WINDOW_SHADE";
|
|
|
|
|
2001-03-29 17:21:53 +00:00
|
|
|
Atom fake;
|
|
|
|
atoms[n] = &fake;
|
2001-09-10 10:38:18 +00:00
|
|
|
names[n++] = (char *) "_DT_SM_WINDOW_INFO";
|
2004-11-09 15:38:33 +00:00
|
|
|
|
|
|
|
atoms[n] = &xdnd_aware;
|
|
|
|
names[n++] = (char*) "XdndAware";
|
|
|
|
atoms[n] = &xdnd_position;
|
|
|
|
names[n++] = (char*) "XdndPosition";
|
|
|
|
|
|
|
|
assert( n <= max );
|
2001-09-10 10:38:18 +00:00
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
XInternAtoms( qt_xdisplay(), names, n, FALSE, atoms_return );
|
|
|
|
for (int i = 0; i < n; i++ )
|
2003-09-16 19:28:03 +00:00
|
|
|
*atoms[i] = atoms_return[i];
|
|
|
|
}
|
1999-12-01 22:09:32 +00:00
|
|
|
|
2003-09-16 19:28:03 +00:00
|
|
|
} // namespace
|