From c4f6d22d8bb59560f7a727bb6e08b0ff53793c6e Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Tue, 15 Sep 2009 10:39:05 +0200 Subject: Bauhaus widgetbox drag and drop not working in Cocoa Bauhaus uses grabMouse to implement their own Drag and Drop mechanism. Cocoa port never considered the grabber widget. All the mouse events will now be routed to the mouse grabber widget. Task-number: 261245 Reviewed-by: MortenS --- src/gui/kernel/qt_cocoa_helpers_mac.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index d27c775..2b2259c 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -876,6 +876,10 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev QWidget *widgetToGetMouse = qwidget; QWidget *popup = qAppInstance()->activePopupWidget(); NSView *tmpView = theView; + if (mac_mouse_grabber && mac_mouse_grabber != widgetToGetMouse) { + widgetToGetMouse = mac_mouse_grabber; + tmpView = qt_mac_nativeview_for(widgetToGetMouse); + } if (popup && popup != qwidget->window()) { widgetToGetMouse = popup; -- cgit v0.12