diff --git a/ChangeLog b/ChangeLog index 70d8ded..de4e19d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-05-17 Matthew Allum + + * src/matchbox-keyboard-ui.c: + Actually select for structure notify events on root to know + when a resize has happened. + 2007-05-15 Matthew Allum * src/matchbox-keyboard-ui.c: diff --git a/src/matchbox-keyboard-ui.c b/src/matchbox-keyboard-ui.c index 556cf95..bdba381 100644 --- a/src/matchbox-keyboard-ui.c +++ b/src/matchbox-keyboard-ui.c @@ -147,6 +147,8 @@ update_display_size(MBKeyboardUI *ui) { XWindowAttributes winattr; + MARK(); + XGetWindowAttributes(ui->xdpy, ui->xwin_root, &winattr); /* XXX should actually trap an X error here */ @@ -163,6 +165,8 @@ update_display_size(MBKeyboardUI *ui) && ui->dpy_orientation != ui->valid_orientation) mb_kbd_ui_hide (ui); + DBG("#### Orientation know '%i'", ui->dpy_orientation); + return; } @@ -693,7 +697,8 @@ mb_kbd_ui_resources_create(MBKeyboardUI *ui) CWOverrideRedirect|CWEventMask, &win_attr); - XSelectInput (ui->xdpy, ui->xwin_root, SubstructureNotifyMask); + XSelectInput (ui->xdpy, ui->xwin_root, + SubstructureNotifyMask|StructureNotifyMask); wm_hints = XAllocWMHints(); @@ -1148,7 +1153,8 @@ mb_kbd_ui_event_loop(MBKeyboardUI *ui) xev.xconfigure.width, xev.xconfigure.height); } - + if (xev.xconfigure.window == ui->xwin_root) + update_display_size(ui); break; case MappingNotify: fakekey_reload_keysyms(ui->fakekey);