~user-none/kdocker/EmbedContainer

« back to all changes in this revision

Viewing changes to src/trayitem.h

  • Committer: John Schember
  • Date: 2009-11-01 03:54:27 UTC
  • Revision ID: john@nachtimwald.com-20091101035427-m5pdel7d3p2xo8fu
Iconify when close button (X) is pressed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <QObject>
28
28
#include <QString>
29
29
#include <QSystemTrayIcon>
 
30
#include <QX11EmbedContainer>
30
31
 
31
32
#include <X11/Xlib.h>
32
33
#include <X11/Xutil.h>
34
35
struct TrayItemSettings {
35
36
    QString customIcon;
36
37
    int balloonTimeout;
37
 
    bool borderless;
38
38
    bool iconify;
39
39
    bool skipTaskbar;
40
40
    bool skipPager;
50
50
    TrayItem(Window window, QObject *parent = 0);
51
51
    ~TrayItem();
52
52
 
 
53
    Window containerWindow();
53
54
    Window dockedWindow();
54
55
 
55
56
    // Pass on all events through this interface
62
63
    void skipTaskbar();
63
64
    void skipPager();
64
65
    void sticky();
65
 
    void removeWindowBorder();
66
66
    void setCustomIcon(QString path);
67
67
    void close(); // close the docked window
68
68
 
93
93
private:
94
94
    void minimizeEvent();
95
95
    void destroyEvent();
96
 
    void propertyChangeEvent(Atom property);
 
96
    bool propertyChangeEvent(Atom property);
97
97
    void obscureEvent();
98
98
    void focusLostEvent();
99
99
    void readDockedAppName();
115
115
    bool m_iconifyFocusLost;
116
116
    int m_balloonTimeout;
117
117
 
 
118
    QX11EmbedContainer *m_container;
 
119
 
118
120
    XSizeHints m_sizeHint; // SizeHint of m_window
119
121
    Window m_window; // The window that is associated with the tray icon.
120
122
    long m_desktop;