symbian-qemu-0.9.1-12/qemu-symbian-svp/gui.c
changeset 61 42fe4f76a74e
parent 1 2fb8b9db1c86
equal deleted inserted replaced
60:97dc1b484861 61:42fe4f76a74e
    18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    19  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    19  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    22  * THE SOFTWARE.
    22  * THE SOFTWARE.
       
    23  *
       
    24  * Contributors:
       
    25  * NTT DOCOMO, INC. -- Clicking a QEMU skin button causes screen flicker on the display area
       
    26  *
    23  */
    27  */
    24 
    28 
    25 #include "hw/hw.h"
    29 #include "hw/hw.h"
    26 #include "sysemu.h"
    30 #include "sysemu.h"
    27 #include "stdio.h"
    31 #include "stdio.h"
  1606 
  1610 
  1607             if (carea != NULL) {
  1611             if (carea != NULL) {
  1608                 if (carea->type == CA_BUTTON) {
  1612                 if (carea->type == CA_BUTTON) {
  1609                     if (state == MOUSE_EVENT_LBUTTON) {
  1613                     if (state == MOUSE_EVENT_LBUTTON) {
  1610                         if (gui_data->current_vt->buttons[carea->id].pressed_img_id > 0)
  1614                         if (gui_data->current_vt->buttons[carea->id].pressed_img_id > 0)
  1611                             gui_show_image(current_vt_id(),
  1615 							gui_show_image(current_vt_id(),
  1612                                            gui_data->current_vt->buttons[carea->id].pressed_img_id);
  1616                                            gui_data->current_vt->buttons[carea->id].pressed_img_id);
  1613 
  1617 
  1614                         button_actions[gui_data->current_vt->buttons[carea->id].actions].down(gui_data->current_vt->buttons[carea->id].parameter);
  1618                         button_actions[gui_data->current_vt->buttons[carea->id].actions].down(gui_data->current_vt->buttons[carea->id].parameter);
  1615                     } else {
  1619                     } else {
  1616                         gui_hide_image(current_vt_id(),
  1620                         if (gui_data->current_vt->buttons[carea->id].pressed_img_id > 0)
  1617                                        gui_data->current_vt->buttons[carea->id].pressed_img_id);
  1621 							gui_hide_image(current_vt_id(),
       
  1622 											gui_data->current_vt->buttons[carea->id].pressed_img_id);
  1618                         button_actions[gui_data->current_vt->buttons[carea->id].actions].up(gui_data->current_vt->buttons[carea->id].parameter);
  1623                         button_actions[gui_data->current_vt->buttons[carea->id].actions].up(gui_data->current_vt->buttons[carea->id].parameter);
  1619                     }
  1624                     }
  1620                 } else { /* pointerarea*/
  1625                 } else { /* pointerarea*/
  1621                     /* get the associated pointerarea */
  1626                     /* get the associated pointerarea */
  1622                     pointer_area_t * const parea = &gui_data->current_vt->pointerareas[carea->id];
  1627                     pointer_area_t * const parea = &gui_data->current_vt->pointerareas[carea->id];