summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/window_proxy.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-05-10 09:46:12 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-10 09:46:12 -0400
commit4963d65206a0817a662159cf0ea7d2d324ddad61 (patch)
treecaa40992de72c6eac0fe85df7a83dd8a68d7746a /libs/gtkmm2ext/window_proxy.cc
parentae7cc64377e60ec4d93de4c7199341e9fa942c5d (diff)
track geometry via configure events for tabbable own-windows
Diffstat (limited to 'libs/gtkmm2ext/window_proxy.cc')
-rw-r--r--libs/gtkmm2ext/window_proxy.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/libs/gtkmm2ext/window_proxy.cc b/libs/gtkmm2ext/window_proxy.cc
index 28ec4fb28d..ee91b7e266 100644
--- a/libs/gtkmm2ext/window_proxy.cc
+++ b/libs/gtkmm2ext/window_proxy.cc
@@ -228,6 +228,8 @@ void
WindowProxy::drop_window ()
{
if (_window) {
+ delete_connection.disconnect ();
+ configure_connection.disconnect ();
_window->hide ();
delete _window;
_window = 0;
@@ -250,12 +252,28 @@ WindowProxy::setup ()
assert (_window);
vistracker = new Gtkmm2ext::VisibilityTracker (*_window);
- _window->signal_delete_event().connect (sigc::mem_fun (*this, &WindowProxy::delete_event_handler));
+
+ delete_connection = _window->signal_delete_event().connect (sigc::mem_fun (*this, &WindowProxy::delete_event_handler));
+ configure_connection = _window->signal_configure_event().connect (sigc::mem_fun (*this, &WindowProxy::configure_handler), false);
set_pos_and_size ();
}
bool
+WindowProxy::configure_handler (GdkEventConfigure* ev)
+{
+ /* stupidly, the geometry data in the event isn't the same as we get
+ from the window geometry APIs.so we have to actively interrogate
+ them to get the new information.
+
+ the difference is generally down to window manager framing.
+ */
+ save_pos_and_size ();
+ return false;
+}
+
+
+bool
WindowProxy::visible() const
{
if (vistracker) {