minor fix

This commit is contained in:
fluxgen 2003-05-10 23:11:33 +00:00
parent 39425a6762
commit c0fa8f2263
2 changed files with 13 additions and 5 deletions

View file

@ -19,7 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: FbWindow.cc,v 1.15 2003/05/10 13:26:37 fluxgen Exp $
// $Id: FbWindow.cc,v 1.16 2003/05/10 23:11:33 fluxgen Exp $
#include "FbWindow.hh"
#include "EventManager.hh"
@ -71,7 +71,8 @@ FbWindow::FbWindow(const FbWindow &parent,
FbWindow::FbWindow(Window client):m_parent(0), m_window(0),
m_destroy(false) { // don't destroy this window
*this = client;
setNew(client);
}
FbWindow::~FbWindow() {
@ -114,6 +115,11 @@ void FbWindow::clear() {
}
FbWindow &FbWindow::operator = (Window win) {
setNew(win);
return *this;
}
void FbWindow::setNew(Window win) {
if (m_window != 0 && m_destroy)
XDestroyWindow(s_display, m_window);
m_window = win;
@ -127,8 +133,7 @@ FbWindow &FbWindow::operator = (Window win) {
&attr) != 0 && attr.screen != 0) {
m_screen_num = XScreenNumberOfScreen(attr.screen);
}
}
return *this;
}
}
void FbWindow::show() {

View file

@ -19,7 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: FbWindow.hh,v 1.13 2003/05/10 13:24:59 fluxgen Exp $
// $Id: FbWindow.hh,v 1.14 2003/05/10 23:11:08 fluxgen Exp $
#ifndef FBTK_FBWINDOW_HH
#define FBTK_FBWINDOW_HH
@ -110,6 +110,9 @@ protected:
explicit FbWindow(Window client);
private:
// sets new window and destroys old
void setNew(Window win);
void updateGeometry();
void create(Window parent, int x, int y, unsigned int width, unsigned int height,
long eventmask,