fixed problem with multiple screens redrawing, the m_screen_num wasnt set
fluxgen fluxgen
1 files changed,
13 insertions(+),
5 deletions(-)
jump to
M
src/FbTk/FbWindow.cc
→
src/FbTk/FbWindow.cc
@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWindow.cc,v 1.13 2003/04/29 09:00:13 fluxgen Exp $ +// $Id: FbWindow.cc,v 1.14 2003/05/06 23:50:31 fluxgen Exp $ #include "FbWindow.hh" #include "EventManager.hh"@@ -69,9 +69,9 @@
}; -FbWindow::FbWindow(Window client):m_parent(0), m_window(client), +FbWindow::FbWindow(Window client):m_parent(0), m_window(0), m_destroy(false) { // don't destroy this window - updateGeometry(); + *this = client; } FbWindow::~FbWindow() {@@ -117,9 +117,17 @@ FbWindow &FbWindow::operator = (Window win) {
if (m_window != 0 && m_destroy) XDestroyWindow(s_display, m_window); m_window = win; - if (m_window != 0) + if (m_window != 0) { updateGeometry(); - + XWindowAttributes attr; + attr.screen = 0; + //get screen number + if (XGetWindowAttributes(s_display, + m_window, + &attr) != 0 && attr.screen != 0) { + m_screen_num = XScreenNumberOfScreen(attr.screen); + } + } return *this; }