~ubuntu-branches/ubuntu/lucid/kdebase/lucid

« back to all changes in this revision

Viewing changes to kwin/atoms.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-05-27 12:09:48 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20080527120948-dottsyd5rcwhzd36
Tags: 4:4.0.80-1ubuntu1
* Merge with Debian
 - remove 97_fix_target_link_libraries.diff
 - Add replaces/conflicts on -kde4 packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************
2
 
 KWin - the KDE window manager
3
 
 This file is part of the KDE project.
4
 
 
5
 
Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
6
 
Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
7
 
 
8
 
You can Freely distribute this program under the GNU General Public
9
 
License. See the file "COPYING" for the exact licensing terms.
10
 
******************************************************************/
11
 
 
12
 
 
13
 
#include <qapplication.h>
14
 
#include "atoms.h"
15
 
#include <assert.h>
16
 
 
17
 
namespace KWinInternal
18
 
{
19
 
 
20
 
Atoms::Atoms()
21
 
    {
22
 
 
23
 
    const int max = 50;
24
 
    Atom* atoms[max];
25
 
    char* names[max];
26
 
    Atom atoms_return[max];
27
 
    int n = 0;
28
 
 
29
 
    atoms[n] = &kwin_running;
30
 
    names[n++] = (char *) "KWIN_RUNNING";
31
 
 
32
 
    atoms[n] = &wm_protocols;
33
 
    names[n++] = (char *) "WM_PROTOCOLS";
34
 
 
35
 
    atoms[n] = &wm_delete_window;
36
 
    names[n++] = (char *) "WM_DELETE_WINDOW";
37
 
 
38
 
    atoms[n] = &wm_take_focus;
39
 
    names[n++] = (char *) "WM_TAKE_FOCUS";
40
 
 
41
 
    atoms[n] = &wm_change_state;
42
 
    names[n++] = (char *) "WM_CHANGE_STATE";
43
 
 
44
 
    atoms[n] = &wm_client_leader;
45
 
    names[n++] = (char *) "WM_CLIENT_LEADER";
46
 
 
47
 
    atoms[n] = &motif_wm_hints;
48
 
    names[n++] = (char *) "_MOTIF_WM_HINTS";
49
 
 
50
 
    atoms[n] = &net_wm_context_help;
51
 
    names[n++] = (char *) "_NET_WM_CONTEXT_HELP";
52
 
 
53
 
    atoms[n] = &net_wm_ping;
54
 
    names[n++] = (char *) "_NET_WM_PING";
55
 
 
56
 
    atoms[n] = &kde_wm_change_state;
57
 
    names[n++] = (char *) "_KDE_WM_CHANGE_STATE";
58
 
 
59
 
    atoms[n] = &net_wm_user_time;
60
 
    names[n++] = (char *) "_NET_WM_USER_TIME";
61
 
    atoms[n] = &kde_net_wm_user_creation_time;
62
 
    names[n++] = (char *) "_KDE_NET_WM_USER_CREATION_TIME";
63
 
 
64
 
    atoms[n] = &kde_system_tray_embedding;
65
 
    names[n++] = (char*) "_KDE_SYSTEM_TRAY_EMBEDDING";
66
 
    
67
 
    atoms[n] = &net_wm_take_activity;
68
 
    names[n++] = (char*) "_NET_WM_TAKE_ACTIVITY";
69
 
    
70
 
    atoms[n] = &net_wm_window_opacity;
71
 
    names[n++] = (char*) "_KDE_WM_WINDOW_OPACITY";
72
 
 
73
 
    atoms[n] = &net_wm_window_shadow;
74
 
    names[n++] = (char*) "_KDE_WM_WINDOW_SHADOW";
75
 
 
76
 
    atoms[n] = &net_wm_window_shade;
77
 
    names[n++] = (char*) "_KDE_WM_WINDOW_SHADE";
78
 
    
79
 
    atoms[n] = &net_wm_window_shapable;
80
 
    names[n++] = (char*) "_KDE_WM_WINDOW_SHAPABLE";
81
 
    
82
 
    atoms[n] = &net_wm_window_decohash;
83
 
    names[n++] = (char*) "_KDE_WM_WINDOW_DECOHASH";
84
 
        
85
 
    Atom fake;
86
 
    atoms[n] = &fake;
87
 
    names[n++] = (char *) "_DT_SM_WINDOW_INFO";
88
 
    
89
 
    atoms[n] = &xdnd_aware;
90
 
    names[n++] = (char*) "XdndAware";
91
 
    atoms[n] = &xdnd_position;
92
 
    names[n++] = (char*) "XdndPosition";
93
 
    
94
 
    atoms[n] = &net_frame_extents;
95
 
    names[n++] = (char*) "_NET_FRAME_EXTENTS";
96
 
    atoms[n] = &kde_net_wm_frame_strut;
97
 
    names[n++] = (char*) "_KDE_NET_WM_FRAME_STRUT";
98
 
    
99
 
    assert( n <= max );
100
 
 
101
 
    XInternAtoms( qt_xdisplay(), names, n, FALSE, atoms_return );
102
 
    for (int i = 0; i < n; i++ )
103
 
        *atoms[i] = atoms_return[i];
104
 
    }
105
 
 
106
 
} // namespace