How to make gxmessage always on top?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#21 Post by jamesbond »

MochiMoppel wrote:It's the crappy JWM 2.3. One more reason for me to stay away from it. Newer is not always better.
Use openbox instead :lol:
Look at this very nice pup from ca. 2008 and see how much nicer it is with openbox :D
ISO: https://archive.org/download/Puppy_Linu ... monkey.iso
About page: https://archive.org/details/Puppy_Linux_Grafpup
(Thanks to ally who preserves this very interesting piece of Puppy Linux history).
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#22 Post by MochiMoppel »

jamesbond wrote:Use openbox instead :lol:
Good joke :lol:
A fatter wm showing the same funny behavior as JWM.2.3. ? No thanks!

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#23 Post by jamesbond »

:lol:

FWIW, this is how it works on Fatdog (gxmessage 2.20.4 on openbox 3.6.1):

Running "gxmessage -nofocus -entry example" from terminal:
1. Terminal still active (titlebar doesn't change colour)
2. Focus stays with terminal (keyboard entry goes to terminal window)
3. gxmessage window shown with inactive window title.
4. There is no way to switch focus to gxmessage afterward (clicking anywhere on its windows has no effect, keyboard entry still goes to terminal). The only exception is the "OK" button that will close gxmessage.

I think that's correct behaviour, because according to its manpage:

Code: Select all

       -nofocus
              Prevents  the  gxmessage  window  from  receiving  focus when it
              opens.
It doesn't say it will not receive focus only when it's first opened, so I interpret it as "will never be able to receive focus at all until eternity (or until it's closed :D ).
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
Keef
Posts: 987
Joined: Thu 20 Dec 2007, 22:12
Location: Staffordshire

#24 Post by Keef »

I was wandering if that was the case. The man page is the only reference I could find for it, so was unsure if the -nofocus was forever or not.

EDIT Now that I think about it (which I didn't before), if you had an entry box, why would you want to keep focus away from it? Just because I can't think of a reason doesn't mean there isn't one of course.

Also, it looks like Mathroval has sorted out the <Group> problem on woof-ce.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#25 Post by MochiMoppel »

jamesbond wrote:4. There is no way to switch focus to gxmessage afterward (clicking anywhere on its windows has no effect, keyboard entry still goes to terminal). The only exception is the "OK" button that will close gxmessage.
The title bar buttons also work and the entry box still works, though only with mouse (delete/copy/cut/paste and drag&drop)
I think that's correct
"when it opens" != "while it is open"

Nevertheless I now tend to think that JWM2.3 indeed is correct, though I like the more flexible approach of 2.2
Yad has the same option with same result and explains it as "Dialog window never take focus".

Both applications instruct the wm to set the window property WM_HINTS to "Client accepts input or input focus: False". That should be clear.
On the other hand it is possible to set nofocus not by the application's -nofocus option (yad: -no-focus) but by JWM's <Group> option. In this case JWM sets WM_HINTS to "Client accepts input or input focus: True" and only prevents setting focus to the window when the window opens. It doesn't prevent setting focus to input elements of the window. This gives JWM users a choice between "hard" nofocus and "soft" nofocus.
Keef wrote:if you had an entry box, why would you want to keep focus away from it?
If you had an entry box, why would you want to use the -nofocus option? And why have an entry box at all? gxmessage is an odd creature and does more than it probably should do - but it's very smart and I like it for that.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#26 Post by jamesbond »

MochiMoppel wrote:
jamesbond wrote:4. There is no way to switch focus to gxmessage afterward (clicking anywhere on its windows has no effect, keyboard entry still goes to terminal). The only exception is the "OK" button that will close gxmessage.
The title bar buttons also work and the entry box still works, though only with mouse (delete/copy/cut/paste and drag&drop)
You're right.
I think that's correct
"when it opens" != "while it is open"
English semantics :lol: For me "when it opens" is a superset and includes the possible condition of "while it is open", although not necessarily so.
This gives JWM users a choice between "hard" nofocus and "soft" nofocus.
So you aren't taking my openbox suggestion then? :D Since openbox doesn't have that AFAIK. I'm so sad ... :twisted:
gxmessage is an odd creature and does more than it probably should do - but it's very smart and I like it for that.
I'll stay with my Xdialog thank you :lol:

Anyway, enough of me derailing the topic. Carry on, guys! Image
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

Post Reply