emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Support fullscreen values fullheight and fullwidth on pgtk


From: Florian Rommel
Subject: Re: Support fullscreen values fullheight and fullwidth on pgtk
Date: Fri, 03 Jun 2022 10:11:14 +0200
User-agent: Evolution 3.44.2

Thanks for your feedback.  See the improved patch.

On Thu, 2022-06-02 at 14:00 +0800, Po Lu wrote:
> 
> > +  GdkWindowState new_state = event->window_state.new_window_state;
> >    union buffered_input_event inev;
> 
> IMO it would look better to simply write:
> 
>   GdkWindowState new_state;
> 
> and then place
> 
>   new_state = event->window_state.new_window_state;
> 
> after all the variable declarations.
> 
> > +#if GTK_CHECK_VERSION (3, 22, 23)
> > +  else if ((new_state & GDK_WINDOW_STATE_TOP_TILED) &&
> > +      (new_state & GDK_WINDOW_STATE_BOTTOM_TILED) &&
> > +      !(new_state & GDK_WINDOW_STATE_TOP_RESIZABLE) &&
> > +      !(new_state & GDK_WINDOW_STATE_BOTTOM_RESIZABLE))
> > +    store_frame_param (f, Qfullscreen, Qfullheight);
> > +  else if ((new_state & GDK_WINDOW_STATE_LEFT_TILED) &&
> > +      (new_state & GDK_WINDOW_STATE_RIGHT_TILED) &&
> > +      !(new_state & GDK_WINDOW_STATE_LEFT_RESIZABLE) &&
> > +      !(new_state & GDK_WINDOW_STATE_RIGHT_RESIZABLE))
> > +    store_frame_param (f, Qfullscreen, Qfullwidth);
> > +#endif
> 
> I think we should just bump the version of GTK required for PGTK to
> 3.22, since users of older versions can use the regular X build.

Okay, I removed the version check.

> 
> Our coding style is also to place the "&&" on the next line.  Here and
> in other places, write:
> 
>   if (very_long_condition_here
>       && other_very_long_condition_here)
>     do_something ();
> 
> instead of:
> 
>   if (very_long_condition_here &&
>       other_very_long_condition_here)
>     do_something ();

Oh yes, I could have seen that in the existing code.

> 
> You also forgot to implement setting the `fullwidth' and `fullheight'
> states.  It should be easy to implement in `set_fullscreen_state',
> though I admit I haven't looked very closely at that.

I am afraid that this is not possible because GTK does not seem to have
a way for setting such states.  As far as I can see, it is only
possible to maximize a window and to set it to fullscreen (fullboth).

Attachment: v2-0001-pgtk-Add-support-for-fullscreen-values-fullheight.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]