You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.8 KiB
44 lines
1.8 KiB
From 1a13806d74973137960e64aa347965525a7c626a Mon Sep 17 00:00:00 2001
|
|
From: Weng Xuetian <wengxt@gmail.com>
|
|
Date: Mon, 8 Feb 2016 18:53:28 -0800
|
|
Subject: [PATCH 099/105] Use ConfigureNotify instead of xcb_configure_window
|
|
to change size
|
|
|
|
Some application only respect configure notify event to change size.
|
|
|
|
REVIEW: 127010
|
|
---
|
|
xembed-sni-proxy/sniproxy.cpp | 15 ++++++++++-----
|
|
1 file changed, 10 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/xembed-sni-proxy/sniproxy.cpp b/xembed-sni-proxy/sniproxy.cpp
|
|
index 3827fdd..b7bb799 100644
|
|
--- a/xembed-sni-proxy/sniproxy.cpp
|
|
+++ b/xembed-sni-proxy/sniproxy.cpp
|
|
@@ -169,12 +169,17 @@ SNIProxy::SNIProxy(xcb_window_t wid, QObject* parent):
|
|
//use an artbitrary heuristic to make sure icons are always sensible
|
|
if (clientWindowSize.isEmpty() || clientWindowSize.width() > s_embedSize || clientWindowSize.height() > s_embedSize )
|
|
{
|
|
- qCDebug(SNIPROXY) << "Resizing window" << wid << Title() << "from w*h" << clientWindowSize;
|
|
+ qCDebug(SNIPROXY) << "Resizing window" << wid << Title() << "from w*h" << clientWindowSize;
|
|
+
|
|
+ xcb_configure_notify_event_t event;
|
|
+ memset(&event, 0x00, sizeof(xcb_configure_notify_event_t));
|
|
+ event.response_type = XCB_CONFIGURE_NOTIFY;
|
|
+ event.event = wid;
|
|
+ event.window = wid;
|
|
+ event.width = s_embedSize;
|
|
+ event.height = s_embedSize;
|
|
+ xcb_send_event(c, false, wid, XCB_EVENT_MASK_STRUCTURE_NOTIFY, (char *) &event);
|
|
|
|
- const uint32_t windowMoveConfigVals[2] = { s_embedSize, s_embedSize };
|
|
- xcb_configure_window(c, wid,
|
|
- XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT,
|
|
- windowMoveConfigVals);
|
|
clientWindowSize = QSize(s_embedSize, s_embedSize);
|
|
}
|
|
|
|
--
|
|
2.5.0
|
|
|