Re: gtk3 toplevel windows incorrectly maximized under gnome3

2015-03-06 Thread Roger Davis


On Fri, 6 Mar 2015, Emmanuele Bassi wrote:


GNOME Shell *is* Mutter. The shell uses libmutter which provides ...


Thanks, Emmanuele. I assumed there was some type of subterfuge in effect 
here.


Roger
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: gtk3 toplevel windows incorrectly maximized under gnome3

2015-03-06 Thread Emmanuele Bassi
Hi;

On Friday, 6 March 2015, Roger Davis r...@soest.hawaii.edu wrote:


 I finally ran this down. The mutter window manager does indeed by default
 auto-maximize any newly mapped window larger than 0.8 of the 'usable screen
 area'. I think the latter means the space between gnome-shell's upper and
 lower toolbars, as I could never get anything more than about 0.75 of the
 total X11 display area.

 I still can't absolutely confirm that I'm actually running mutter because
 it does not appear in my system process list, and wmctrl says my WM is
 'GNOME Shell'.


GNOME Shell *is* Mutter. The shell uses libmutter which provides the whole
windowing system logic as well as the interface with the rest of the
windowing system (both input and output). Mutter is just a simple binary
that uses libmutter internally in the same way the Shell does but without
all the logic and UI provided by the Shell.

Ciao,
 Emmanuele.





-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to make a GtkButton respond to a key press

2015-03-06 Thread Michael Torrie
On 03/05/2015 09:31 PM, Jim Charlton wrote:
 I presume you have a callback function connected to the button press 
 event.  Just create code to intercept the keyboard event and go to a 
 callback function that sees what key was pressed and then calls the same 
 function that would have been called had the button been pressed.
 
 The first example I found from Google was
 http://stackoverflow.com/questions/10134956/in-simple-gtk-key-press-event-example-gdk-shift-mask-seems-to-be-ignored
 
 You can see the code you need to intercept the keyboard event.
 
 I do exactly this sort of thing in programs with the user being able to 
 hit a select keyboard key or click the button (although I am using gtkmm3).

No, this is not quite what I am asking for.  Capturing keyboard events
is fine, but I need the button to click visually, for feedback purposes.
 Just like what happens if you define the control key shortcut and press
that.

So the question is either, how can I get GtkButton to respond to a
non-modifier hotkey, or how can I programmatically get GtkButton to
visually depress and release?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to make a GtkButton respond to a key press

2015-03-06 Thread Jim Charlton

On 15-03-06 06:52 AM, Michael Torrie wrote:

On 03/05/2015 09:31 PM, Jim Charlton wrote:

I presume you have a callback function connected to the button press
event.  Just create code to intercept the keyboard event and go to a
callback function that sees what key was pressed and then calls the same
function that would have been called had the button been pressed.

The first example I found from Google was
http://stackoverflow.com/questions/10134956/in-simple-gtk-key-press-event-example-gdk-shift-mask-seems-to-be-ignored

You can see the code you need to intercept the keyboard event.

I do exactly this sort of thing in programs with the user being able to
hit a select keyboard key or click the button (although I am using gtkmm3).

No, this is not quite what I am asking for.  Capturing keyboard events
is fine, but I need the button to click visually, for feedback purposes.
  Just like what happens if you define the control key shortcut and press
that.

So the question is either, how can I get GtkButton to respond to a
non-modifier hotkey, or how can I programmatically get GtkButton to
visually depress and release?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Ah.  I see.  Sorry that I misunderstood.  In my case, I just use the 
button set_sensitive() method to deactivate the button until I am ready 
to reactivate it.  This greys out the button.  I suppose that you could 
use this with a short delay to flash the button.  Or you could just 
flash the button background color.


It seems like gtk just changes/flashes the background color of the 
button when you click it, but I am not sure exactly which method it uses 
to do that.


jim...
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to make a GtkButton respond to a key press

2015-03-06 Thread Michael Cronenworth

On 03/06/2015 08:52 AM, Michael Torrie wrote:

No, this is not quite what I am asking for.  Capturing keyboard events
is fine, but I need the button to click visually, for feedback purposes.
  Just like what happens if you define the control key shortcut and press
that.

So the question is either, how can I get GtkButton to respond to a
non-modifier hotkey, or how can I programmatically get GtkButton to
visually depress and release?


You can call g_signal_emit_by_name() for the GtkButton activate signal to get the 
visual animation of a button press and release.

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


Re: How to make a GtkButton respond to a key press

2015-03-06 Thread Phil Wolff
 
When using Glade to design a UI, I've noticed that the Button dialog has
an Activatable/Actionable section which includes an on/off Use Action
Appearance selection. This suggests that you might look into
GtkActionable and kin...

On 2015/03/06 07:55, Jim Charlton wrote:
 On 15-03-06 06:52 AM, Michael Torrie wrote:
 On 03/05/2015 09:31 PM, Jim Charlton wrote:
 I presume you have a callback function connected to the button press
 event.  Just create code to intercept the keyboard event and go to a
 callback function that sees what key was pressed and then calls the
 same
 function that would have been called had the button been pressed.

 The first example I found from Google was
 http://stackoverflow.com/questions/10134956/in-simple-gtk-key-press-event-example-gdk-shift-mask-seems-to-be-ignored


 You can see the code you need to intercept the keyboard event.

 I do exactly this sort of thing in programs with the user being able to
 hit a select keyboard key or click the button (although I am using
 gtkmm3).
 No, this is not quite what I am asking for.  Capturing keyboard events
 is fine, but I need the button to click visually, for feedback purposes.
   Just like what happens if you define the control key shortcut and
 press
 that.

 So the question is either, how can I get GtkButton to respond to a
 non-modifier hotkey, or how can I programmatically get GtkButton to
 visually depress and release?
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 Ah.  I see.  Sorry that I misunderstood.  In my case, I just use the
 button set_sensitive() method to deactivate the button until I am
 ready to reactivate it.  This greys out the button.  I suppose that
 you could use this with a short delay to flash the button.  Or you
 could just flash the button background color.

 It seems like gtk just changes/flashes the background color of the
 button when you click it, but I am not sure exactly which method it
 uses to do that.

 jim...
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

-- 
We're not giving up. We're waiting for a better opportunity to win.
-- Lois McMaster Bujold
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to make a GtkButton respond to a key press

2015-03-06 Thread Michael Torrie
On 03/06/2015 08:23 AM, Michael Cronenworth wrote:
 On 03/06/2015 08:52 AM, Michael Torrie wrote:
 No, this is not quite what I am asking for.  Capturing keyboard events
 is fine, but I need the button to click visually, for feedback purposes.
   Just like what happens if you define the control key shortcut and press
 that.

 So the question is either, how can I get GtkButton to respond to a
 non-modifier hotkey, or how can I programmatically get GtkButton to
 visually depress and release?
 
 You can call g_signal_emit_by_name() for the GtkButton activate signal to 
 get the 
 visual animation of a button press and release.

Ahh. Yes this is what I want mostly. Is there any way to get it to
animate down and hold there, say when a person is holding down the key?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: gtk3 toplevel windows incorrectly maximized under gnome3

2015-03-06 Thread Roger Davis


I finally ran this down. The mutter window manager does indeed by default 
auto-maximize any newly mapped window larger than 0.8 of the 'usable 
screen area'. I think the latter means the space between gnome-shell's 
upper and lower toolbars, as I could never get anything more than about 
0.75 of the total X11 display area.


I still can't absolutely confirm that I'm actually running mutter because 
it does not appear in my system process list, and wmctrl says my WM is 
'GNOME Shell'. However, the behavior I am experiencing is exactly as 
described within the mutter source code, and you can actually disable it 
via


gsettings set org.gnome.mutter auto-maximize false

I have to confess to enjoying some of the comments in bug reports filed on 
this behavior that led to the above gsettings workaround.


Roger
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list