It seems most GTK apps like mintMenu and the default Gnome2/Mate menu
use the GDK grab focus functions to grab input (pointer/keyboard).
These functions appear to suck all input to the app like a blackhole.
This patch gives more interactivity to the mintMenu window, making it
a first class object in the desktop.
Things that work now:
* When the window is open, hovering on other desktop icons highlights them
* Clicking outside the window propagates the event (e.g. select another
window)
* Alt-tab and other events unfocus and hide the window
* Scrollbars in the mintMenu finally work right
* Probably several other small things
Restructured a bit how theming and coloring works. Now theme and color
changes work on the fly. No need to restart mintMenu anymore. Note that
changing theme no longer regenerates plugins, so it's faster.
Fixes issue #47
When using compositing and transparency, the first draw was only
showing the shadow borders on the window. To fix this the opacity has
to be set after the first show. Don't know why this is needed, but it's
probably a bug in the underlying toolkits (maybe GTK or GDK).
It still looks a little jerky the first time the window is drawn.
When the search entry was out of focus and types were redirected to it,
if the current selected application was hidden by the filtering, both
the holder and entry lost focus. This stopped the typing event
redirection. Now the entry is always focused when typing.
Now category buttons only clear text when clicked, not when hovered.
It seems more natural, because a now the mouse position is irrelevant
when trying to type on the search entry.
Some popups, like the right click menus on the Apps page or the Search
button, pop up and back down immediately. Now they work as they should.
Fixes#28
If user is in favorites pane -> starts typing, first character is lost
This is because the changeTab->focusSearchEntry->set_text("")
Not sure if right way, but fixing this by setting the text to its prev
value after the changeTab, works well for me
If you click on favorites and click on any area outside menu -> nothing happens
This is because the mouse is grabed by window.
Fix this by registering a callback instead of immediately grabbing(not sure why this was added by Michael)
Frankly this code can use some DRY love