Re: Preserved Window Placement

2012-10-28 Thread Alberto Ruiz
2012/10/28 Federico Mena Quintero 
>
> Even easier and general-purpose:
>
> gtk_window_set_state_saving_key (window, char *key);
>
>
Not easier, if your app has multiple windows, you can just set a property
on/off on your app class and have the internals of GtkApplication do what
is right and even clever things like storing the relative position to each
other and handle that on screen(s) resolution changes on the next
application startup.


> Call it before realization, and Magic Happens at the right time :)
>
>   Federico

-- 
Cheers,
Alberto Ruiz
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Preserved Window Placement

2012-10-28 Thread Federico Mena Quintero
On Sun, 2012-10-28 at 08:53 +, Richard Hughes wrote:

> I was wondering if we could do something using GtkApplication. It
> seems a shame to reimplement this in every app when most apps have
> just one window...

Even easier and general-purpose:

gtk_window_set_state_saving_key (window, char *key);

Call it before realization, and Magic Happens at the right time :)

  Federico

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Preserved Window Placement

2012-10-28 Thread Richard Hughes
On 26 October 2012 15:07, Havoc Pennington  wrote:
> This could be even higher-level in fact. All the app "must" do is specify
> which windows are "the same" from invocation to invocation. That is the
> fundamental problem (what is the "key" we are saving the window state
> underneath).  gtk_window_set_state_key() ? At that point GTK+ (in
> cooperation with the desktop e.g. WM, if you like) can do the actual saving.

I was wondering if we could do something using GtkApplication. It
seems a shame to reimplement this in every app when most apps have
just one window...

Richard.
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list