Hi Antoine,
Clicking the app dock icon or double clicking the app in Finder generates a
reopen event, which causes the NSApplication delegate to receive the
applicationShouldHandleReopen:hasVisibleWindows: message.
You could add support for this to gtkosxapplication_quartz.c and
GtkApplicationDelegate.[hc] and make a pull request.
For now, the simple way to handle this is to just link a category on
GtkApplicationDelegate.
You might want to use g_signal_emit(), like GtkApplicationDelegate does.
// GtkApplicationDelegate_Additions.m
#include "GtkApplicationDelegate.h"
extern void handle_dock_icon_clicked();
@implementation GtkApplicationDelegate (GtkApplicationDelegate_Additions)
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication
hasVisibleWindows:(BOOL)flag
{
handle_dock_icon_clicked();
return YES;
}
@end
On Mar 15, 2016, at 10:54 PM, Antoine Martin <[email protected]> wrote:
Hi,
I would like to get notified when the dock is clicked on, so that I can
restore any windows currently minimized. (that's the expected behaviour
on OSX apparently)
The only signal I can listen for that fires when one clicks on the dock
is the "NSApplicationDidBecomeActive", but that's not really what I am
looking for since it will also fire in other cases.
Am I missing something?
Is anyone already doing this in other gtk-osx applications?
Thanks
Antoine
_______________________________________________
Gtk-osx-users-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list
_______________________________________________
Gtk-osx-users-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list