# HG changeset patch # User bugtracker-ml@nttdocomo.com # Date 1271944662 -3600 # Node ID 42fe4f76a74ec41a83321a8ef4c695fbc638ed6f # Parent 97dc1b484861b7340e0e0428a9e730bbd6fecef5 Fix bug 2183 - Clicking a QEMU skin button causes screen flicker on the display area (edit) diff -r 97dc1b484861 -r 42fe4f76a74e symbian-qemu-0.9.1-12/qemu-symbian-svp/gui.c --- a/symbian-qemu-0.9.1-12/qemu-symbian-svp/gui.c Wed Apr 14 10:22:25 2010 +0100 +++ b/symbian-qemu-0.9.1-12/qemu-symbian-svp/gui.c Thu Apr 22 14:57:42 2010 +0100 @@ -20,6 +20,10 @@ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. + * + * Contributors: + * NTT DOCOMO, INC. -- Clicking a QEMU skin button causes screen flicker on the display area + * */ #include "hw/hw.h" @@ -1608,13 +1612,14 @@ if (carea->type == CA_BUTTON) { if (state == MOUSE_EVENT_LBUTTON) { if (gui_data->current_vt->buttons[carea->id].pressed_img_id > 0) - gui_show_image(current_vt_id(), + gui_show_image(current_vt_id(), gui_data->current_vt->buttons[carea->id].pressed_img_id); button_actions[gui_data->current_vt->buttons[carea->id].actions].down(gui_data->current_vt->buttons[carea->id].parameter); } else { - gui_hide_image(current_vt_id(), - gui_data->current_vt->buttons[carea->id].pressed_img_id); + if (gui_data->current_vt->buttons[carea->id].pressed_img_id > 0) + gui_hide_image(current_vt_id(), + gui_data->current_vt->buttons[carea->id].pressed_img_id); button_actions[gui_data->current_vt->buttons[carea->id].actions].up(gui_data->current_vt->buttons[carea->id].parameter); } } else { /* pointerarea*/