Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 11-23-2010, 05:21 PM   #1
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?

Old 11-24-2010, 07:10 AM   #2
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:37 AM
using GtkComboBox with widgets in c joel2001k Programming 1 03-15-2009 01:08 PM
How to reinstall a signal handler after exec ( Strange behaviour in signal handling ) lali.p Programming 0 09-20-2008 01:11 PM
signal 11error every time an application closes Siriond Linux - Software 3 08-30-2004 12:13 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:30 PM.

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