KWin
atoms.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "atoms.h"
00023 #include "utils.h"
00024 #include <assert.h>
00025
00026 namespace KWin
00027 {
00028
00029 Atoms::Atoms()
00030 {
00031
00032 const int max = 50;
00033 Atom* atoms[max];
00034 char* names[max];
00035 Atom atoms_return[max];
00036 int n = 0;
00037
00038 atoms[n] = &kwin_running;
00039 names[n++] = (char *) "KWIN_RUNNING";
00040
00041 atoms[n] = &wm_protocols;
00042 names[n++] = (char *) "WM_PROTOCOLS";
00043
00044 atoms[n] = &wm_delete_window;
00045 names[n++] = (char *) "WM_DELETE_WINDOW";
00046
00047 atoms[n] = &wm_take_focus;
00048 names[n++] = (char *) "WM_TAKE_FOCUS";
00049
00050 atoms[n] = &wm_change_state;
00051 names[n++] = (char *) "WM_CHANGE_STATE";
00052
00053 atoms[n] = &wm_client_leader;
00054 names[n++] = (char *) "WM_CLIENT_LEADER";
00055
00056 atoms[n] = &wm_window_role;
00057 names[n++] = (char *) "WM_WINDOW_ROLE";
00058
00059 atoms[n] = &wm_state;
00060 names[n++] = (char *) "WM_STATE";
00061
00062 atoms[n] = &sm_client_id;
00063 names[n++] = (char *) "SM_CLIENT_ID";
00064
00065 atoms[n] = &motif_wm_hints;
00066 names[n++] = (char *) "_MOTIF_WM_HINTS";
00067
00068 atoms[n] = &net_wm_context_help;
00069 names[n++] = (char *) "_NET_WM_CONTEXT_HELP";
00070
00071 atoms[n] = &net_wm_ping;
00072 names[n++] = (char *) "_NET_WM_PING";
00073
00074 atoms[n] = &kde_wm_change_state;
00075 names[n++] = (char *) "_KDE_WM_CHANGE_STATE";
00076
00077 atoms[n] = &net_wm_user_time;
00078 names[n++] = (char *) "_NET_WM_USER_TIME";
00079 atoms[n] = &kde_net_wm_user_creation_time;
00080 names[n++] = (char *) "_KDE_NET_WM_USER_CREATION_TIME";
00081
00082 atoms[n] = &kde_system_tray_embedding;
00083 names[n++] = (char*) "_KDE_SYSTEM_TRAY_EMBEDDING";
00084
00085 atoms[n] = &net_wm_take_activity;
00086 names[n++] = (char*) "_NET_WM_TAKE_ACTIVITY";
00087
00088 atoms[n] = &net_wm_window_opacity;
00089 names[n++] = (char*) "_NET_WM_WINDOW_OPACITY";
00090
00091 Atom fake;
00092 atoms[n] = &fake;
00093 names[n++] = (char *) "_DT_SM_WINDOW_INFO";
00094
00095 atoms[n] = &fake;
00096 names[n++] = (char *) "_MOTIF_WM_INFO";
00097
00098 atoms[n] = &xdnd_aware;
00099 names[n++] = (char*) "XdndAware";
00100 atoms[n] = &xdnd_position;
00101 names[n++] = (char*) "XdndPosition";
00102
00103 atoms[n] = &net_frame_extents;
00104 names[n++] = (char*) "_NET_FRAME_EXTENTS";
00105 atoms[n] = &kde_net_wm_frame_strut;
00106 names[n++] = (char*) "_KDE_NET_WM_FRAME_STRUT";
00107
00108 atoms[n] = &net_wm_sync_request_counter;
00109 names[n++] = (char*) "_NET_WM_SYNC_REQUEST_COUNTER";
00110
00111 atoms[n] = &net_wm_sync_request;
00112 names[n++] = (char*) "_NET_WM_SYNC_REQUEST";
00113
00114 assert( n <= max );
00115
00116 XInternAtoms( display(), names, n, false, atoms_return );
00117 for (int i = 0; i < n; i++ )
00118 *atoms[i] = atoms_return[i];
00119 }
00120
00121 }