Re: [Fremantle] Compositing is disabled in fullscreen

2010-09-16 Thread Luca Donaggio
2010/9/16 Hämäläinen Kimmo 

> On Fri, 2010-09-03 at 16:24 +0200, ext Luca Donaggio wrote:
> > I know that compositing is disabled in fullscreen, as some composited
> > widget (for example the fullscreen button in hildon-extras) are shown
> > with a black background instead of a semi-transparent one.
> > But I noticed one thing: if a hildon-banner appears in fullscreen when
> > one of such widgets is on the screen, the window manager turns
> > compositing on (the translucid background of the other widget is
> > shown), just to turn it off when the banner disappears.
> >
> > Is there a way to trick the window manager to act the same for
> > arbitrary widgets as for hildon-banners?
>
> Try explicitly preventing switching the compositing off by setting this
> window property (with value 0) to your application window:
>
> static void set_compositing (Display *display, Window xwindow)
> {
>Atom atom;
>int zero = 0;
>atom = XInternAtom (display, "_HILDON_NON_COMPOSITED_WINDOW",
> False);
>XChangeProperty (display,
>   xwindow,
>   atom,
>   XA_INTEGER, 32, PropModeReplace,
>   (unsigned char *) &zero, 1);
> }
>
> -Kimmo
>
> >
> > --
> > Luca Donaggio
>
>
That did the trick!

Thanks for your help, Kimmo.

-- 
Luca Donaggio
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Fremantle] Compositing is disabled in fullscreen

2010-09-16 Thread Hämäläinen Kimmo
On Fri, 2010-09-03 at 16:24 +0200, ext Luca Donaggio wrote:
> I know that compositing is disabled in fullscreen, as some composited
> widget (for example the fullscreen button in hildon-extras) are shown
> with a black background instead of a semi-transparent one.
> But I noticed one thing: if a hildon-banner appears in fullscreen when
> one of such widgets is on the screen, the window manager turns
> compositing on (the translucid background of the other widget is
> shown), just to turn it off when the banner disappears.
> 
> Is there a way to trick the window manager to act the same for
> arbitrary widgets as for hildon-banners?

Try explicitly preventing switching the compositing off by setting this
window property (with value 0) to your application window:

static void set_compositing (Display *display, Window xwindow) 
{
Atom atom; 
int zero = 0;
atom = XInternAtom (display, "_HILDON_NON_COMPOSITED_WINDOW", False);
XChangeProperty (display,
   xwindow,
   atom,
   XA_INTEGER, 32, PropModeReplace,
   (unsigned char *) &zero, 1);
}

-Kimmo

> 
> -- 
> Luca Donaggio

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Fremantle] Compositing is disabled in fullscreen

2010-09-13 Thread Luca Donaggio
On Sun, Sep 12, 2010 at 6:50 PM, Cornelius Hald  wrote:

> Hi Luca,
>
> On Wed, 2010-09-08 at 17:13 +0200, Luca Donaggio wrote:
> > Well, it could be... but I was looking at Conboy's sources and I
> > couldn't see any obvious difference between it's interface setup and
> > the (silly) example I included before, nor any theme-specific stuff.
> > So why does he-fullscreen-button is semi transparent in
> > Conboy'fullscreen mode and not in my example?
> > I feel like I'm missing something really obvious here :-) !
>
> I've tried your example code and I get the exact same behavior. No
> transparency. I've looked for differences between your code and my code,
> tried some things, but couldn't find anything that did affect the
> result.
>
> I'm quite sure that it is a problem with the compositor, because I can
> see the transparency if I start your example and go to fullsceen. Then
> quickly open and close the virtual keyboard. After that the button is
> transparent for a couple of seconds. Probably the virtual keyboard
> enables the compositor.
>
> >From what I know the compositor should automatically get started "when
> it is needed". But unfortunately I have no idea how that is determined.
> Maybe someone with more knowledge of Maemo internals could comment on
> that.
>
> I've never used the full screen button outside of Conboy and only
> developed it in this context. Still, I could find Maepad where the
> button is also working (not sure if there are more working examples). I
> really hope we can find out why it is working in some applications and
> why not in others. After that I'll happily fix this bug in
> HeFullscreenButton. Unfortunately I'm currently out of ideas.
>
> If you (or anyone else) have ideas/input/anything, please let me know.
> Sorry that I can't be more helpful right now.
>
> Cheers,
> Conny
>
> P.S. Now I also feel like I'm missing something totally obvious :)
>
>
>
Hi Conny,

thanks for your time and efforts, I'll report back to this list if I'll find
something new.

-- 
Luca Donaggio
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Fremantle] Compositing is disabled in fullscreen

2010-09-12 Thread Cornelius Hald
Hi Luca,

On Wed, 2010-09-08 at 17:13 +0200, Luca Donaggio wrote:
> Well, it could be... but I was looking at Conboy's sources and I
> couldn't see any obvious difference between it's interface setup and
> the (silly) example I included before, nor any theme-specific stuff.
> So why does he-fullscreen-button is semi transparent in
> Conboy'fullscreen mode and not in my example?
> I feel like I'm missing something really obvious here :-) !

I've tried your example code and I get the exact same behavior. No
transparency. I've looked for differences between your code and my code,
tried some things, but couldn't find anything that did affect the
result.

I'm quite sure that it is a problem with the compositor, because I can
see the transparency if I start your example and go to fullsceen. Then
quickly open and close the virtual keyboard. After that the button is
transparent for a couple of seconds. Probably the virtual keyboard
enables the compositor.

>From what I know the compositor should automatically get started "when
it is needed". But unfortunately I have no idea how that is determined.
Maybe someone with more knowledge of Maemo internals could comment on
that.

I've never used the full screen button outside of Conboy and only
developed it in this context. Still, I could find Maepad where the
button is also working (not sure if there are more working examples). I
really hope we can find out why it is working in some applications and
why not in others. After that I'll happily fix this bug in
HeFullscreenButton. Unfortunately I'm currently out of ideas.

If you (or anyone else) have ideas/input/anything, please let me know.
Sorry that I can't be more helpful right now.

Cheers,
Conny

P.S. Now I also feel like I'm missing something totally obvious :)


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Fremantle] Compositing is disabled in fullscreen

2010-09-09 Thread Javier S. Pedro
Luca Donaggio wrote:
> I know that compositing is disabled in fullscreen, as some 
composited
> widget (for example the fullscreen button in hildon-extras) are 
shown with
> a black background instead of a semi-transparent one.
> But I noticed one thing: if a hildon-banner appears in fullscreen 
when one
> of such widgets is on the screen, the window manager turns 
compositing on
> (the translucid background of the other widget is shown), just to 
turn it
> off when the banner disappears.
> 
> Is there a way to trick the window manager to act the same for 
arbitrary
> widgets as for hildon-banners?
> 

The window manager will keep compositing if it finds certain window 
"types" present when entering full screen mode. For example, the 
"banner" window, or a Hildon Animation Actor. Since you can easily 
create the latter (hildon_animation_actor_*), I would use that to keep 
the window manager from switching.

On the other side, you should check if you really need to keep 
compositing enabled if you're not using any window needing it. AFAIK, 
the fullscreen hildon-extras is not actually using composition but 
some other strategy.

Javier.


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Fremantle] Compositing is disabled in fullscreen

2010-09-09 Thread Cornelius Hald
Hi Luca,

On Wed, 2010-09-08 at 17:13 +0200, Luca Donaggio wrote:

> Well, it could be... but I was looking at Conboy's sources and I
> couldn't see any obvious difference between it's interface setup and
> the (silly) example I included before, nor any theme-specific stuff.
> So why does he-fullscreen-button is semi transparent in
> Conboy'fullscreen mode and not in my example?
> I feel like I'm missing something really obvious here :-) !

from looking at your example I can't see anything obvious wrong. I'll
give it a try during the weekend and report back to you.

Cheers,
Conny


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Fremantle] Compositing is disabled in fullscreen

2010-09-08 Thread Luca Donaggio
On Wed, Sep 8, 2010 at 1:32 PM, Gary Birkett  wrote:

> I do not think the compositor effects placement and transparency of buttons
> themselves
> that sounds more like a theming issue?
>
> Gary
>
> On Wed, Sep 8, 2010 at 11:29 AM, Luca Donaggio  wrote:
>
>> On Sat, Sep 4, 2010 at 12:14 PM, Cornelius Hald  wrote:
>>
>>> Hi Luca,
>>>
>>> On Fri, 2010-09-03 at 16:24 +0200, Luca Donaggio wrote:
>>> > I know that compositing is disabled in fullscreen, as some composited
>>> > widget (for example the fullscreen button in hildon-extras) are shown
>>> > with a black background instead of a semi-transparent one.
>>> > But I noticed one thing: if a hildon-banner appears in fullscreen when
>>> > one of such widgets is on the screen, the window manager turns
>>> > compositing on (the translucid background of the other widget is
>>> > shown), just to turn it off when the banner disappears.
>>> >
>>> > Is there a way to trick the window manager to act the same for
>>> > arbitrary widgets as for hildon-banners?
>>>
>>> I can't really answer your question. Just add a comment. If I'm going
>>> into fullscreen mode in Conboy the button background is not black. It
>>> semi-transparent. Not sure that helps something, though...
>>>
>>> Cheers,
>>> Conny
>>>
>>>
>>>
>> I still had no luck solving this problem, but at least I can reproduce it;
>> I cooked a very simple program to show what's going on (attached), maybe
>> someone more skilled can help me!
>>
>> --
>> Luca Donaggio
>>
>> ___
>> maemo-developers mailing list
>> maemo-developers@maemo.org
>> https://lists.maemo.org/mailman/listinfo/maemo-developers
>>
>>
>
Well, it could be... but I was looking at Conboy's sources and I couldn't
see any obvious difference between it's interface setup and the (silly)
example I included before, nor any theme-specific stuff.
So why does he-fullscreen-button is semi transparent in Conboy'fullscreen
mode and not in my example?
I feel like I'm missing something really obvious here :-) !

-- 
Luca Donaggio
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Fremantle] Compositing is disabled in fullscreen

2010-09-08 Thread Gary Birkett
I do not think the compositor effects placement and transparency of buttons
themselves
that sounds more like a theming issue?

Gary

On Wed, Sep 8, 2010 at 11:29 AM, Luca Donaggio  wrote:

> On Sat, Sep 4, 2010 at 12:14 PM, Cornelius Hald  wrote:
>
>> Hi Luca,
>>
>> On Fri, 2010-09-03 at 16:24 +0200, Luca Donaggio wrote:
>> > I know that compositing is disabled in fullscreen, as some composited
>> > widget (for example the fullscreen button in hildon-extras) are shown
>> > with a black background instead of a semi-transparent one.
>> > But I noticed one thing: if a hildon-banner appears in fullscreen when
>> > one of such widgets is on the screen, the window manager turns
>> > compositing on (the translucid background of the other widget is
>> > shown), just to turn it off when the banner disappears.
>> >
>> > Is there a way to trick the window manager to act the same for
>> > arbitrary widgets as for hildon-banners?
>>
>> I can't really answer your question. Just add a comment. If I'm going
>> into fullscreen mode in Conboy the button background is not black. It
>> semi-transparent. Not sure that helps something, though...
>>
>> Cheers,
>> Conny
>>
>>
>>
> I still had no luck solving this problem, but at least I can reproduce it;
> I cooked a very simple program to show what's going on (attached), maybe
> someone more skilled can help me!
>
> --
> Luca Donaggio
>
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Fremantle] Compositing is disabled in fullscreen

2010-09-08 Thread Luca Donaggio
On Sat, Sep 4, 2010 at 12:14 PM, Cornelius Hald  wrote:

> Hi Luca,
>
> On Fri, 2010-09-03 at 16:24 +0200, Luca Donaggio wrote:
> > I know that compositing is disabled in fullscreen, as some composited
> > widget (for example the fullscreen button in hildon-extras) are shown
> > with a black background instead of a semi-transparent one.
> > But I noticed one thing: if a hildon-banner appears in fullscreen when
> > one of such widgets is on the screen, the window manager turns
> > compositing on (the translucid background of the other widget is
> > shown), just to turn it off when the banner disappears.
> >
> > Is there a way to trick the window manager to act the same for
> > arbitrary widgets as for hildon-banners?
>
> I can't really answer your question. Just add a comment. If I'm going
> into fullscreen mode in Conboy the button background is not black. It
> semi-transparent. Not sure that helps something, though...
>
> Cheers,
> Conny
>
>
>
I still had no luck solving this problem, but at least I can reproduce it; I
cooked a very simple program to show what's going on (attached), maybe
someone more skilled can help me!

-- 
Luca Donaggio
/*
 gcc -Wall `pkg-config gtk+-2.0 hildon-1 hildon-extras-1 --cflags --libs` he-fullscreen-example.c -o he-fullscreen-example
 */

#include 
#include 
#include 

static void go_fullscreen(GtkWidget *callerobj,gpointer data) {
	if (!(gdk_window_get_state(gtk_widget_get_window(GTK_WIDGET (data))) & GDK_WINDOW_STATE_FULLSCREEN)) {
		gtk_window_fullscreen(GTK_WINDOW (data));
	} else {
		gtk_window_unfullscreen(GTK_WINDOW (data));
	}
}

int main () {
	HildonProgram *prog;
	HildonWindow *mainwin;
	/* GtkWidget *panarea, *evbox, *image; */
	GtkWidget *textview;
	HeFullscreenButton *fsbut;
	HildonAppMenu *menu;
	GtkWidget *button;

	hildon_gtk_init (NULL, NULL);

	prog = HILDON_PROGRAM (hildon_program_get_instance ());
	mainwin = HILDON_WINDOW (hildon_window_new ());
	gtk_window_set_title (GTK_WINDOW (mainwin),"Example");
	hildon_program_add_window (prog, mainwin);

	menu = HILDON_APP_MENU (hildon_app_menu_new ());
	button = gtk_button_new_with_label ("Fullscreen");
	g_signal_connect_after (button, "clicked", G_CALLBACK (go_fullscreen), mainwin);
	hildon_app_menu_append (menu, GTK_BUTTON (button));
	button = gtk_button_new_with_label ("Quit");
	g_signal_connect_after (button, "clicked", G_CALLBACK (gtk_main_quit), NULL);
	hildon_app_menu_append (menu, GTK_BUTTON (button));
	gtk_widget_show_all (GTK_WIDGET (menu));
	hildon_window_set_app_menu (mainwin, menu);

	/*panarea = hildon_pannable_area_new();
	gtk_container_add (GTK_CONTAINER (mainwin), panarea);

	image = gtk_image_new_from_file("image.jpg");

	evbox = gtk_event_box_new();
	gtk_container_add (GTK_CONTAINER (evbox), image);
	hildon_pannable_area_add_with_viewport(HILDON_PANNABLE_AREA (panarea),evbox);*/
	textview = hildon_text_view_new();
	gtk_container_add(GTK_CONTAINER (mainwin), textview);

	gtk_widget_show_all (GTK_WIDGET (mainwin));

	fsbut = he_fullscreen_button_new(GTK_WINDOW (mainwin));

	gtk_main ();
	return 0;
}

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: [Fremantle] Compositing is disabled in fullscreen

2010-09-04 Thread Cornelius Hald
Hi Luca,

On Fri, 2010-09-03 at 16:24 +0200, Luca Donaggio wrote:
> I know that compositing is disabled in fullscreen, as some composited
> widget (for example the fullscreen button in hildon-extras) are shown
> with a black background instead of a semi-transparent one.
> But I noticed one thing: if a hildon-banner appears in fullscreen when
> one of such widgets is on the screen, the window manager turns
> compositing on (the translucid background of the other widget is
> shown), just to turn it off when the banner disappears.
> 
> Is there a way to trick the window manager to act the same for
> arbitrary widgets as for hildon-banners?

I can't really answer your question. Just add a comment. If I'm going
into fullscreen mode in Conboy the button background is not black. It
semi-transparent. Not sure that helps something, though...

Cheers,
Conny


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


[Fremantle] Compositing is disabled in fullscreen

2010-09-03 Thread Luca Donaggio
I know that compositing is disabled in fullscreen, as some composited widget
(for example the fullscreen button in hildon-extras) are shown with a black
background instead of a semi-transparent one.
But I noticed one thing: if a hildon-banner appears in fullscreen when one
of such widgets is on the screen, the window manager turns compositing on
(the translucid background of the other widget is shown), just to turn it
off when the banner disappears.

Is there a way to trick the window manager to act the same for arbitrary
widgets as for hildon-banners?

-- 
Luca Donaggio
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers