View Single Post
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#76
Originally Posted by fms View Post
I had to disable qwerty's fix to the overlay widget, as there are issues with it.
This appears to be a problem [the solution] on Maemo 5. (It has been discussed on -developers twice.)

Conny and I decided to workaround it by disabling/enabling the widget depending on if the HildonWindow (or any widget derived from it, like HildonStackableWindow) is on the screen.

I don't have the time now to do a diff, but the following in he-fullscreen-button.c should do it:
Code:
static void
fullscreen_button_on_is_topmost_changed (GObject *object G_GNUC_UNUSED,
		                                 GParamSpec *property G_GNUC_UNUSED,
		                                 gpointer data)
{
	HeFullscreenButton *self = HE_FULLSCREEN_BUTTON (data);

	if (hildon_window_get_is_topmost (HILDON_WINDOW(self->parent_window))) {
		if (gdk_window_get_state (GTK_WIDGET (self->parent_window)->window) & GDK_WINDOW_STATE_FULLSCREEN) {
			fullscreen_button_enable (self);
		}
	}
	else {
		fullscreen_button_disable (self);
	}
}

[Before return self in he_fullscreen_button_new()]
    if (HILDON_IS_WINDOW(parent_window)) {
        g_signal_connect (parent_window, "notify::is-topmost",
            G_CALLBACK(fullscreen_button_on_is_topmost_changed), self);
    }

[After g_signal_handlers_disconnect_by_func (self->parent_window, fullscreen_button_destroy, self);]
g_signal_handlers_disconnect_by_func (self->parent_window, fullscreen_button_on_is_topmost_changed, self);
Oh, fullscreen_button_disable/fullscreen_button_enable are not called fullscreen_button_disable/fullscreen_button_enable in the castrated he-fullscreen-button.c for FBReader...

If you need to see the full code, check out the hildon-extras SVN project; I just committed rev. 13.

Last edited by qwerty12; 2009-12-17 at 19:08.