aboutsummaryrefslogtreecommitdiff
path: root/src/FbWinFrame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r--src/FbWinFrame.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index d4ca980..da6fd74 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -674,10 +674,7 @@ void FbWinFrame::setClientWindow(FbTk::FbWindow &win) {
674 674
675 // we need to mask this so we don't get unmap event 675 // we need to mask this so we don't get unmap event
676 win.setEventMask(NoEventMask); 676 win.setEventMask(NoEventMask);
677 win.reparent(m_window, 0, clientArea().y()); 677 win.reparent(m_window, clientArea().x(), clientArea().y());
678 // remask window so we get events
679 win.setEventMask(PropertyChangeMask | StructureNotifyMask |
680 FocusChangeMask | KeyPressMask);
681 678
682 m_window.setEventMask(ButtonPressMask | ButtonReleaseMask | 679 m_window.setEventMask(ButtonPressMask | ButtonReleaseMask |
683 ButtonMotionMask | EnterWindowMask | 680 ButtonMotionMask | EnterWindowMask |
@@ -685,14 +682,14 @@ void FbWinFrame::setClientWindow(FbTk::FbWindow &win) {
685 682
686 XFlush(win.display()); 683 XFlush(win.display());
687 684
685 // remask window so we get events
688 XSetWindowAttributes attrib_set; 686 XSetWindowAttributes attrib_set;
689 attrib_set.event_mask = PropertyChangeMask | StructureNotifyMask | FocusChangeMask; 687 attrib_set.event_mask = PropertyChangeMask | StructureNotifyMask | FocusChangeMask | KeyPressMask;
690 attrib_set.do_not_propagate_mask = ButtonPressMask | ButtonReleaseMask | 688 attrib_set.do_not_propagate_mask = ButtonPressMask | ButtonReleaseMask |
691 ButtonMotionMask; 689 ButtonMotionMask;
692 690
693 XChangeWindowAttributes(win.display(), win.window(), CWEventMask|CWDontPropagate, &attrib_set); 691 XChangeWindowAttributes(win.display(), win.window(), CWEventMask|CWDontPropagate, &attrib_set);
694 692
695 m_clientarea.raise();
696 if (isVisible()) 693 if (isVisible())
697 win.show(); 694 win.show();
698 win.raise(); 695 win.raise();
@@ -808,7 +805,6 @@ void FbWinFrame::setEventHandler(FbTk::EventHandler &evh) {
808 evm.add(evh, m_grip_right); 805 evm.add(evh, m_grip_right);
809 evm.add(evh, m_grip_left); 806 evm.add(evh, m_grip_left);
810 evm.add(evh, m_window); 807 evm.add(evh, m_window);
811 evm.add(evh, m_clientarea);
812} 808}
813 809
814/** 810/**
@@ -823,7 +819,6 @@ void FbWinFrame::removeEventHandler() {
823 evm.remove(m_grip_right); 819 evm.remove(m_grip_right);
824 evm.remove(m_grip_left); 820 evm.remove(m_grip_left);
825 evm.remove(m_window); 821 evm.remove(m_window);
826 evm.remove(m_clientarea);
827} 822}
828 823
829void FbWinFrame::exposeEvent(XExposeEvent &event) { 824void FbWinFrame::exposeEvent(XExposeEvent &event) {
@@ -1344,7 +1339,6 @@ void FbWinFrame::init() {
1344 1339
1345 m_button_size = 26; 1340 m_button_size = 26;
1346 1341
1347 m_clientarea.setBorderWidth(0);
1348 m_label.setBorderWidth(0); 1342 m_label.setBorderWidth(0);
1349 m_state.shaded = false; 1343 m_state.shaded = false;
1350 1344
@@ -1360,6 +1354,10 @@ void FbWinFrame::init() {
1360 // Note: we don't show clientarea yet 1354 // Note: we don't show clientarea yet
1361 1355
1362 setEventHandler(*this); 1356 setEventHandler(*this);
1357
1358 // setup cursors for resize grips
1359 gripLeft().setCursor(theme()->lowerLeftAngleCursor());
1360 gripRight().setCursor(theme()->lowerRightAngleCursor());
1363} 1361}
1364 1362
1365/** 1363/**