LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-23-2010, 04:21 PM   #1
leiphasw
LQ Newbie
 
Registered: Oct 2010
Location: Morgantown, Pennsylvania, USA
Distribution: Angstrom
Posts: 16

Rep: Reputation: 0
How to get a signal when a GtkComboBox dropdown closes?


I have an app with a Drawing window that gets partially overwritten by the drop down of a combo box. When the combo box closes, the drawing window does not get any window invalidate type messages and that section just stays blank until something else happens that causes the drawing window to repaint. I want to trap the close of the combo box and queue a redraw of the drawing window. However, I can't find any signal that happens when the combo closes without changing the active selection. When the selection changes I get the changed event and can repaint. When the selection does not change, nothing happens.

Anyone know how to do this?

Thanks,
Steve.
 
Old 11-24-2010, 06:10 AM   #2
leiphasw
LQ Newbie
 
Registered: Oct 2010
Location: Morgantown, Pennsylvania, USA
Distribution: Angstrom
Posts: 16

Original Poster
Rep: Reputation: 0
FYI: If anyone finds this with a similar problem, I have developed a workaround that solves the problem in my specific environment. In my environment the GUI I am building is on an embedded system with a touch screen and no keyboard. That specifically allows me to not support any keyboard interface to any of the screen controls. I discovered that when the mouse pointer on my build system (laptop with keyboard, mouse, etc.) moved from the drawing control over a screen button that could accept the focus, the drawing window is always redrawn. Therefore, what I found by experimentation was that if I disallow focus to the combo box control and do allow focus to one of the other screen buttons, when I click on the combo box focus "leaves" the other button but can't exactly rest on the combo since it is disallowed. Then when I close the combo regardless of whether I change the selection or not, focus then reverts to the other screen button which can accept focus. Voila' the drawing window gets an invalidate and immediately repaints! Works like a champ.

The only thing I need to do now is cast the focus color of the button that ends up with the focus all the time to something that doesn't make it look weird in comparison to all the other buttons which don't have the focus. Focus is not relevant since there is no keyboard to allow that focus to do anything anyway.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
user-define signal handler & coredump for signal 11(SIGSEGV) Alexlun Linux - Software 2 05-24-2009 06:37 AM
using GtkComboBox with widgets in c joel2001k Programming 1 03-15-2009 12:08 PM
How to reinstall a signal handler after exec ( Strange behaviour in signal handling ) lali.p Programming 0 09-20-2008 12:11 PM
signal 11error every time an application closes Siriond Linux - Software 3 08-29-2004 11:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration