2000-03-24 22:23:02 +00:00
|
|
|
/*****************************************************************
|
|
|
|
kwin - the KDE window manager
|
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>
|
|
|
|
******************************************************************/
|
1999-08-19 23:26:42 +00:00
|
|
|
#include <qapplication.h>
|
|
|
|
#include "atoms.h"
|
|
|
|
|
|
|
|
Atoms::Atoms()
|
|
|
|
{
|
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
const int max = 20;
|
|
|
|
Atom* atoms[max];
|
|
|
|
char* names[max];
|
|
|
|
Atom atoms_return[max];
|
|
|
|
int n = 0;
|
1999-12-01 22:09:32 +00:00
|
|
|
|
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
|
|
|
|
1999-08-19 23:26:42 +00:00
|
|
|
// compatibility
|
1999-11-28 20:10:58 +00:00
|
|
|
atoms[n] = &kwm_win_icon;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "KWM_WIN_ICON";
|
1999-12-01 22:09:32 +00:00
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
// compatibility
|
|
|
|
atoms[n] = &kwm_running;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "KWM_RUNNING";
|
|
|
|
|
|
|
|
atoms[n] = &kwm_command;
|
|
|
|
names[n++] = (char *) "KWM_COMMAND";
|
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
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
atoms[n] = &net_number_of_desktops;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "_NET_NUMBER_OF_DESKTOPS";
|
1999-12-01 22:09:32 +00:00
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
atoms[n] = &net_current_desktop;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "_NET_CURRENT_DESKTOP";
|
1999-12-01 22:09:32 +00:00
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
atoms[n] = &net_active_window;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "_NET_ACTIVE_WINDOW";
|
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
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
atoms[n] = &net_client_list;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "_NET_CLIENT_LIST";
|
1999-12-01 22:09:32 +00:00
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
atoms[n] = &net_client_list_stacking;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "_NET_CLIENT_LIST_STACKING";
|
1999-12-01 22:09:32 +00:00
|
|
|
|
1999-11-28 20:10:58 +00:00
|
|
|
atoms[n] = &net_kde_docking_windows;
|
1999-12-03 21:08:07 +00:00
|
|
|
names[n++] = (char *) "_NET_KDE_DOCKING_WINDOWS";
|
1999-12-01 22:09:32 +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++ )
|
|
|
|
*atoms[i] = atoms_return[i];
|
1999-12-01 22:09:32 +00:00
|
|
|
|
|
|
|
|
1999-08-19 23:26:42 +00:00
|
|
|
}
|