Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 25 Nov 2014, 21:36
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Weird gtkdialog bug
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 474
Location: Japan

PostPosted: Thu 04 Sep 2014, 09:00    Post_subject:  Weird gtkdialog bug
Sub_title: Dialog pops-up, dies immediately
 

I need a dialog that
- has a defined height
- opens at current mouse position
- exits when it loses focus (e.g. user clicks outside of dialog)

Something like this:
Code:
export DIALOG='
<window  height-request="200" window-position="2">
<button ok></button>
<action signal="focus-out-event">Exit:0</action>
</window>'
gtkdialog -p DIALOG


This code does not work when no other windows are open in current desktop (or all other windows are minimized) and the dialog is called from a keyboard shortcut or ROX panel. However it works when the mouse pointer is over the JWM tray. It also works on such otherwise empty desktop when any one of the conditions
- window-position="2"
- height-request
- action signal="focus-out-event"
is removed. It also works when height is set to a smaller size or window-position set to 1

On desktops where at least one other window exists everything works as expected. Any idea how to prevent this bug?
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3379
Location: Ontario

PostPosted: Thu 04 Sep 2014, 17:49    Post_subject:  

Just a guess…

Have you tried putting a frame inside the window and giving
it some width and height request??? I've noticed that frames
make gtkdialog act more reliably.

I've also added in other widgets such as text widgets
as a way of getting a minimum height. That is a method to avoid

height-request="200"
_________________________________

Maybe adding
<hseparator></hseparator>

or

<vseparator></vseparator>

would make it act different??


__________________________
Back to top
View user's profile Send_private_message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 474
Location: Japan

PostPosted: Tue 09 Sep 2014, 00:40    Post_subject:  

don570 wrote:
Have you tried putting a frame inside the window and giving it some width and height request???
width and height for a frame?

No, nothing works. I think the problem is that gtkdialog and the window managers have different ideas what constitutes a focus-out-event. For example this works differently in Openbox and JWM:
Code:
export DIALOG='
<window  skip_taskbar_hint="true" >
<button ok></button>
<action signal="focus-out-event">beep</action>
</window>'
gtkdialog -p DIALOG

Openbox would beep even when resizing the dialog window but would ignore when another window gets focus. Very strange.
Back to top
View user's profile Send_private_message 
don570


Joined: 10 Mar 2010
Posts: 3379
Location: Ontario

PostPosted: Tue 09 Sep 2014, 19:39    Post_subject:  

Zigbert uses a separate app to make a right click pop up a window.
Examples : pfind and pmusic
However it does have a bug in Openbox window manager.

____________________________________________________
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0580s ][ Queries: 11 (0.0088s) ][ GZIP on ]