diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/FbWinFrame.cc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index bfef355..a803680 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.17 2003/04/14 14:40:30 fluxgen Exp $ | 22 | // $Id: FbWinFrame.cc,v 1.18 2003/04/14 23:40:41 fluxgen Exp $ |
23 | 23 | ||
24 | #include "FbWinFrame.hh" | 24 | #include "FbWinFrame.hh" |
25 | #include "ImageControl.hh" | 25 | #include "ImageControl.hh" |
@@ -270,18 +270,23 @@ void FbWinFrame::setClientWindow(Window win) { | |||
270 | XSetWindowBorderWidth(display, win, 0); | 270 | XSetWindowBorderWidth(display, win, 0); |
271 | 271 | ||
272 | XChangeSaveSet(display, win, SetModeInsert); | 272 | XChangeSaveSet(display, win, SetModeInsert); |
273 | XSetWindowAttributes attrib_set; | 273 | |
274 | // sync old events so we can discard events from reparent later | 274 | |
275 | XSync(display, False); | 275 | XSelectInput(display, m_clientarea.window(), NoEventMask); |
276 | // we need to mask this so we don't get unmap event | ||
277 | XSelectInput(display, win, NoEventMask); | ||
276 | XReparentWindow(display, win, m_clientarea.window(), 0, 0); | 278 | XReparentWindow(display, win, m_clientarea.window(), 0, 0); |
277 | XSync(display, True); // discard unmap notify event | 279 | // remask window so we get events |
278 | // redirected events from client window | 280 | XSelectInput(display, win, PropertyChangeMask | StructureNotifyMask | |
281 | FocusChangeMask ); | ||
279 | XSelectInput(display, m_clientarea.window(), SubstructureRedirectMask); | 282 | XSelectInput(display, m_clientarea.window(), SubstructureRedirectMask); |
280 | 283 | ||
281 | XFlush(display); | 284 | XFlush(display); |
282 | 285 | ||
286 | XSetWindowAttributes attrib_set; | ||
283 | attrib_set.event_mask = PropertyChangeMask | StructureNotifyMask | FocusChangeMask; | 287 | attrib_set.event_mask = PropertyChangeMask | StructureNotifyMask | FocusChangeMask; |
284 | attrib_set.do_not_propagate_mask = ButtonPressMask | ButtonReleaseMask | ButtonMotionMask; | 288 | attrib_set.do_not_propagate_mask = ButtonPressMask | ButtonReleaseMask | |
289 | ButtonMotionMask; | ||
285 | 290 | ||
286 | XChangeWindowAttributes(display, win, CWEventMask|CWDontPropagate, &attrib_set); | 291 | XChangeWindowAttributes(display, win, CWEventMask|CWDontPropagate, &attrib_set); |
287 | 292 | ||