diff options
-rw-r--r-- | src/libs/client/OSCClientReceiver.cpp | 2 | ||||
-rw-r--r-- | src/libs/gui/NodeModule.cpp | 11 | ||||
-rw-r--r-- | src/libs/gui/NodeModule.hpp | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp index b9f5a70d..0a1fa105 100644 --- a/src/libs/client/OSCClientReceiver.cpp +++ b/src/libs/client/OSCClientReceiver.cpp @@ -35,7 +35,7 @@ OSCClientReceiver::OSCClientReceiver(int listen_port) _listen_port(listen_port), _st(NULL) { - start(false); + start(true); } diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp index ed05c859..fef7b648 100644 --- a/src/libs/gui/NodeModule.cpp +++ b/src/libs/gui/NodeModule.cpp @@ -41,6 +41,8 @@ NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeMode , _slv2_ui(NULL) , _gui(NULL) , _gui_item(NULL) + , _last_gui_request_width(0) + , _last_gui_request_height(0) { assert(_node); @@ -207,6 +209,12 @@ NodeModule::embed_gui(bool embed) void NodeModule::gui_size_request(Gtk::Requisition* r) { + // For some reason this is called continuously (probably every redraw) + // This shouldn't be happening (FIXME)... + + if (_last_gui_request_width == r->width && _last_gui_request_height == r->height) + return; + if (r->width + 4 > _width) set_minimum_width(r->width + 4); @@ -215,6 +223,9 @@ NodeModule::gui_size_request(Gtk::Requisition* r) _ports_y_offset = r->height + 2; resize(); + + _last_gui_request_width = r->width; + _last_gui_request_height = r->height; } diff --git a/src/libs/gui/NodeModule.hpp b/src/libs/gui/NodeModule.hpp index ce4d88c4..14be9dee 100644 --- a/src/libs/gui/NodeModule.hpp +++ b/src/libs/gui/NodeModule.hpp @@ -90,6 +90,8 @@ protected: SLV2UIInstance _slv2_ui; Gtk::Widget* _gui; Gnome::Canvas::Widget* _gui_item; + int _last_gui_request_width; + int _last_gui_request_height; }; |