Skip to content

Commit 46ad61a

Browse files
linesightclaude
andcommitted
wxpython, x11: fix browser not resizing on Linux window resize
XConfigureWindow in SetX11WindowBounds was never flushed to the X server, so the Chrome sub-window stayed at its original size. Add XFlush after the configure call, and call NotifyMoveOrResizeStarted before SetBounds so CEF is notified before the resize happens. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2fd1f85 commit 46ad61a

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

examples/wxpython.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ def OnSize(self, _):
193193
elif LINUX:
194194
(x, y) = (0, 0)
195195
(width, height) = self.browser_panel.GetSize().Get()
196+
self.browser.NotifyMoveOrResizeStarted()
196197
self.browser.SetBounds(x, y, width, height)
198+
return
197199
self.browser.NotifyMoveOrResizeStarted()
198200

199201
def OnClose(self, event):

src/client_handler/x11.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ void SetX11WindowBounds(CefRefPtr<CefBrowser> browser,
4444
changes.height = static_cast<int>(height);
4545
XConfigureWindow(xdisplay, xwindow,
4646
CWX | CWY | CWHeight | CWWidth, &changes);
47+
XFlush(xdisplay);
4748
}
4849

4950
void SetX11WindowTitle(CefRefPtr<CefBrowser> browser, char* title) {

0 commit comments

Comments
 (0)