From b029b7d5606053a32a31c4f978879ac4b785a35a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Mon, 22 Oct 2012 13:51:39 +0000 Subject: [PATCH] [GB.GTK] * BUG: Fix event handling when a window has only invisible top-level menus. * BUG: Fix a possible crash in TrayIcon mouse wheel event handling. git-svn-id: svn://localhost/gambas/trunk@5247 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.gtk/src/gmainwindow.cpp | 2 +- gb.gtk/src/gtrayicon.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gb.gtk/src/gmainwindow.cpp b/gb.gtk/src/gmainwindow.cpp index 227389b04..648c4afd2 100644 --- a/gb.gtk/src/gmainwindow.cpp +++ b/gb.gtk/src/gmainwindow.cpp @@ -1223,7 +1223,7 @@ int gMainWindow::clientY() { GtkRequisition req; - if (menuBar && GTK_WIDGET_VISIBLE(GTK_WIDGET(menuBar))) + if (isMenuBarVisible()) //menuBar && GTK_WIDGET_VISIBLE(GTK_WIDGET(menuBar))) { gtk_widget_size_request(GTK_WIDGET(menuBar), &req); return req.height; diff --git a/gb.gtk/src/gtrayicon.cpp b/gb.gtk/src/gtrayicon.cpp index e36b1daeb..4580a03fa 100644 --- a/gb.gtk/src/gtrayicon.cpp +++ b/gb.gtk/src/gtrayicon.cpp @@ -267,15 +267,14 @@ gPicture *gTrayIcon::_default_icon = NULL; gTrayIcon::gTrayIcon() { plug = NULL; - //icon = NULL; buftext = NULL; _icon = NULL; _style = NULL; _loopLevel = 0; - //onHide=false; onMousePress=NULL; onMouseRelease=NULL; + onMouseWheel = NULL; onMenu=NULL; onFocusEnter=NULL; onFocusLeave=NULL;