cocoa.m (8d3a5d9b0f76e3f965ce2b845f6e9027fd98fd30) | cocoa.m (7fb1cf1606c78c9d5b538f29176fd5a101726a9d) |
---|---|
1/* 2 * QEMU Cocoa CG display driver 3 * 4 * Copyright (c) 2008 Mike Kronenberg 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 719 unchanged lines hidden (view full) --- 728 * mouse grab or window focus. If we have neither then this event 729 * is the user clicking on the background window to activate and 730 * bring us to the front, which will be done by the sendEvent 731 * call below. We definitely don't want to pass that click through 732 * to the guest. 733 */ 734 if ((isMouseGrabbed || [[self window] isKeyWindow]) && 735 (last_buttons != buttons)) { | 1/* 2 * QEMU Cocoa CG display driver 3 * 4 * Copyright (c) 2008 Mike Kronenberg 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 719 unchanged lines hidden (view full) --- 728 * mouse grab or window focus. If we have neither then this event 729 * is the user clicking on the background window to activate and 730 * bring us to the front, which will be done by the sendEvent 731 * call below. We definitely don't want to pass that click through 732 * to the guest. 733 */ 734 if ((isMouseGrabbed || [[self window] isKeyWindow]) && 735 (last_buttons != buttons)) { |
736 static uint32_t bmap[INPUT_BUTTON_MAX] = { | 736 static uint32_t bmap[INPUT_BUTTON__MAX] = { |
737 [INPUT_BUTTON_LEFT] = MOUSE_EVENT_LBUTTON, 738 [INPUT_BUTTON_MIDDLE] = MOUSE_EVENT_MBUTTON, 739 [INPUT_BUTTON_RIGHT] = MOUSE_EVENT_RBUTTON, 740 [INPUT_BUTTON_WHEEL_UP] = MOUSE_EVENT_WHEELUP, 741 [INPUT_BUTTON_WHEEL_DOWN] = MOUSE_EVENT_WHEELDN, 742 }; 743 qemu_input_update_buttons(dcl->con, bmap, last_buttons, buttons); 744 last_buttons = buttons; --- 715 unchanged lines hidden --- | 737 [INPUT_BUTTON_LEFT] = MOUSE_EVENT_LBUTTON, 738 [INPUT_BUTTON_MIDDLE] = MOUSE_EVENT_MBUTTON, 739 [INPUT_BUTTON_RIGHT] = MOUSE_EVENT_RBUTTON, 740 [INPUT_BUTTON_WHEEL_UP] = MOUSE_EVENT_WHEELUP, 741 [INPUT_BUTTON_WHEEL_DOWN] = MOUSE_EVENT_WHEELDN, 742 }; 743 qemu_input_update_buttons(dcl->con, bmap, last_buttons, buttons); 744 last_buttons = buttons; --- 715 unchanged lines hidden --- |