aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r--src/FbWinFrame.cc31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index ccbcaed..0d84fd6 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWinFrame.cc,v 1.59 2003/10/09 16:48:09 rathnor Exp $ 22// $Id: FbWinFrame.cc,v 1.60 2003/10/28 02:17:02 rathnor Exp $
23 23
24#include "FbWinFrame.hh" 24#include "FbWinFrame.hh"
25 25
@@ -367,15 +367,17 @@ void FbWinFrame::setClientWindow(Window win) {
367 XSetWindowBorderWidth(display, win, 0); 367 XSetWindowBorderWidth(display, win, 0);
368 368
369 XChangeSaveSet(display, win, SetModeInsert); 369 XChangeSaveSet(display, win, SetModeInsert);
370 370
371 XSelectInput(display, m_clientarea.window(), NoEventMask); 371 XSelectInput(display, m_window.window(), NoEventMask);
372
372 // we need to mask this so we don't get unmap event 373 // we need to mask this so we don't get unmap event
373 XSelectInput(display, win, NoEventMask); 374 XSelectInput(display, win, NoEventMask);
374 XReparentWindow(display, win, m_clientarea.window(), 0, 0); 375 XReparentWindow(display, win, m_window.window(), 0, m_clientarea.y());
375 // remask window so we get events 376 // remask window so we get events
376 XSelectInput(display, win, PropertyChangeMask | StructureNotifyMask | 377 XSelectInput(display, win, PropertyChangeMask | StructureNotifyMask |
377 FocusChangeMask); 378 FocusChangeMask);
378 XSelectInput(display, m_clientarea.window(), SubstructureRedirectMask); 379 XSelectInput(display, m_window.window(), ButtonPressMask | ButtonReleaseMask |
380 ButtonMotionMask | EnterWindowMask | SubstructureRedirectMask);
379 381
380 XFlush(display); 382 XFlush(display);
381 383
@@ -387,8 +389,8 @@ void FbWinFrame::setClientWindow(Window win) {
387 XChangeWindowAttributes(display, win, CWEventMask|CWDontPropagate, &attrib_set); 389 XChangeWindowAttributes(display, win, CWEventMask|CWDontPropagate, &attrib_set);
388 390
389 m_clientarea.raise(); 391 m_clientarea.raise();
390 m_clientarea.showSubwindows(); 392 XRaiseWindow(display, win);
391 393 m_window.showSubwindows();
392} 394}
393 395
394bool FbWinFrame::hideTitlebar() { 396bool FbWinFrame::hideTitlebar() {
@@ -397,7 +399,6 @@ bool FbWinFrame::hideTitlebar() {
397 399
398 m_titlebar.hide(); 400 m_titlebar.hide();
399 m_use_titlebar = false; 401 m_use_titlebar = false;
400 m_clientarea.raise();
401 402
402 // only take away one borderwidth (as the other border is still the "top" border) 403 // only take away one borderwidth (as the other border is still the "top" border)
403 m_window.resize(m_window.width(), m_window.height() - m_titlebar.height() - 404 m_window.resize(m_window.width(), m_window.height() - m_titlebar.height() -
@@ -623,8 +624,12 @@ void FbWinFrame::reconfigure() {
623 gripLeft().height()); 624 gripLeft().height());
624 625
625 // align titlebar and render it 626 // align titlebar and render it
626 if (m_use_titlebar) 627 if (m_use_titlebar) {
627 reconfigureTitlebar(); 628 reconfigureTitlebar();
629 m_titlebar.raise();
630 } else
631 m_titlebar.lower();
632
628 633
629 // leave client+grips alone if we're shaded (it'll get fixed when we unshade) 634 // leave client+grips alone if we're shaded (it'll get fixed when we unshade)
630 if (!m_shaded) { 635 if (!m_shaded) {
@@ -644,10 +649,8 @@ void FbWinFrame::reconfigure() {
644 m_clientarea.moveResize(0, client_top, 649 m_clientarea.moveResize(0, client_top,
645 m_window.width(), client_height); 650 m_window.width(), client_height);
646 651
647
648 if (m_use_handle) { 652 if (m_use_handle) {
649 653
650
651 // align handle and grips 654 // align handle and grips
652 const int grip_height = m_handle.height(); 655 const int grip_height = m_handle.height();
653 const int grip_width = 20; //TODO 656 const int grip_width = 20; //TODO
@@ -662,8 +665,12 @@ void FbWinFrame::reconfigure() {
662 665
663 m_grip_right.moveResize(m_handle.width() - grip_width - handle_bw, -handle_bw, 666 m_grip_right.moveResize(m_handle.width() - grip_width - handle_bw, -handle_bw,
664 grip_width, grip_height); 667 grip_width, grip_height);
668 m_handle.raise();
669 } else {
670 m_handle.lower();
665 } 671 }
666 } 672 }
673
667 674
668 // render the theme 675 // render the theme
669 renderButtons(); 676 renderButtons();