aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/FbWindow.hh
diff options
context:
space:
mode:
authorsimonb <simonb>2005-04-10 18:18:14 (GMT)
committersimonb <simonb>2005-04-10 18:18:14 (GMT)
commit88c66f0687d2a9e2018f22407b2587dc4d87d012 (patch)
tree197308ad2426783058f479d12329548c6a8a4374 /src/FbTk/FbWindow.hh
parent6cf66c66554a20a1c98eddf26af9e35b7c90cbd5 (diff)
downloadfluxbox-88c66f0687d2a9e2018f22407b2587dc4d87d012.zip
fluxbox-88c66f0687d2a9e2018f22407b2587dc4d87d012.tar.bz2
Big changes to how transparency works
Consequently rearrange lots of rendering ops, and strip calls to updateTransparent
Diffstat (limited to 'src/FbTk/FbWindow.hh')
-rw-r--r--src/FbTk/FbWindow.hh31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh
index a72ea26..0c481c9 100644
--- a/src/FbTk/FbWindow.hh
+++ b/src/FbTk/FbWindow.hh
@@ -93,24 +93,40 @@ public:
93 virtual void show(); 93 virtual void show();
94 virtual void showSubwindows(); 94 virtual void showSubwindows();
95 95
96 /// Notify that the parent window was moved,
97 /// thus the absolute position of this one moved
98 virtual inline void parentMoved() {
99 updateBackground(true);
100 }
101
96 virtual inline void move(int x, int y) { 102 virtual inline void move(int x, int y) {
103 if (x == m_x && y == m_y)
104 return;
97 XMoveWindow(s_display, m_window, x, y); 105 XMoveWindow(s_display, m_window, x, y);
98 m_x = x; 106 m_x = x;
99 m_y = y; 107 m_y = y;
108 updateBackground(true);
100 } 109 }
101 110
102 virtual inline void resize(unsigned int width, unsigned int height) { 111 virtual inline void resize(unsigned int width, unsigned int height) {
103 XResizeWindow(s_display, m_window, width, height); 112 if (width == m_width && height == m_height)
104 m_width = width; 113 return;
105 m_height = height; 114 XResizeWindow(s_display, m_window, width, height);
115 m_width = width;
116 m_height = height;
117 updateBackground(true);
106 } 118 }
107 119
108 virtual inline void moveResize(int x, int y, unsigned int width, unsigned int height) { 120 virtual inline void moveResize(int x, int y, unsigned int width, unsigned int height) {
121 if (x == m_x && y == m_y && width == m_width && height == m_height)
122 return;
109 XMoveResizeWindow(s_display, m_window, x, y, width, height); 123 XMoveResizeWindow(s_display, m_window, x, y, width, height);
110 m_x = x; 124 m_x = x;
111 m_y = y; 125 m_y = y;
112 m_width = width; 126 m_width = width;
113 m_height = height; 127 m_height = height;
128 updateBackground(true);
129
114 } 130 }
115 virtual void lower(); 131 virtual void lower();
116 virtual void raise(); 132 virtual void raise();
@@ -139,8 +155,6 @@ public:
139 155
140 void deleteProperty(Atom property); 156 void deleteProperty(Atom property);
141 157
142 void setBufferPixmap(Pixmap pm);
143
144 std::string textProperty(Atom property) const; 158 std::string textProperty(Atom property) const;
145 159
146 /// @return parent FbWindow 160 /// @return parent FbWindow
@@ -184,6 +198,9 @@ private:
184 bool save_unders, 198 bool save_unders,
185 int depth, 199 int depth,
186 int class_type); 200 int class_type);
201 /// forces full background change, recalcing of alpha values if necessary
202 void updateBackground(bool only_if_alpha);
203
187 const FbWindow *m_parent; ///< parent FbWindow 204 const FbWindow *m_parent; ///< parent FbWindow
188 int m_screen_num; ///< screen num on which this window exist 205 int m_screen_num; ///< screen num on which this window exist
189 mutable Window m_window; ///< the X window 206 mutable Window m_window; ///< the X window
@@ -193,7 +210,9 @@ private:
193 int m_depth; ///< bit depth 210 int m_depth; ///< bit depth
194 bool m_destroy; ///< wheter the x window was created before 211 bool m_destroy; ///< wheter the x window was created before
195 std::auto_ptr<FbTk::Transparent> m_transparent; 212 std::auto_ptr<FbTk::Transparent> m_transparent;
196 Pixmap m_buffer_pm; 213 bool m_lastbg_color_set;
214 unsigned long m_lastbg_color;
215 Pixmap m_lastbg_pm;
197}; 216};
198 217
199bool operator == (Window win, const FbWindow &fbwin); 218bool operator == (Window win, const FbWindow &fbwin);