Make the grab breaking on window move work on Leopard (as well as Tiger)
2007-11-03 Richard Hult <richard@imendio.com> * gdk/quartz/GdkQuartzWindow.c: * gdk/quartz/GdkQuartzWindow.h: Make the grab breaking on window move work on Leopard (as well as Tiger) by ignoring which mouse button is pressed. svn path=/trunk/; revision=18964
This commit is contained in:

committed by
Richard Hult

parent
01ce77f540
commit
e518a8d6e8
@ -1,3 +1,10 @@
|
|||||||
|
2007-11-03 Richard Hult <richard@imendio.com>
|
||||||
|
|
||||||
|
* gdk/quartz/GdkQuartzWindow.c:
|
||||||
|
* gdk/quartz/GdkQuartzWindow.h: Make the grab breaking on window
|
||||||
|
move work on Leopard (as well as Tiger) by ignoring which mouse
|
||||||
|
button is pressed.
|
||||||
|
|
||||||
2007-11-03 Richard Hult <richard@imendio.com>
|
2007-11-03 Richard Hult <richard@imendio.com>
|
||||||
|
|
||||||
* gdk/quartz/gdkwindow-quartz.c: (move_resize_window_internal):
|
* gdk/quartz/gdkwindow-quartz.c: (move_resize_window_internal):
|
||||||
|
@ -98,7 +98,6 @@
|
|||||||
*/
|
*/
|
||||||
-(void)windowWillMove:(NSNotification *)aNotification
|
-(void)windowWillMove:(NSNotification *)aNotification
|
||||||
{
|
{
|
||||||
if (leftDown)
|
|
||||||
inMove = YES;
|
inMove = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,15 +105,10 @@
|
|||||||
{
|
{
|
||||||
switch ([event type])
|
switch ([event type])
|
||||||
{
|
{
|
||||||
case NSLeftMouseDown:
|
|
||||||
leftDown = YES;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NSLeftMouseUp:
|
case NSLeftMouseUp:
|
||||||
leftDown = NO;
|
|
||||||
inMove = NO;
|
|
||||||
inManualMove = NO;
|
inManualMove = NO;
|
||||||
inManualResize = NO;
|
inManualResize = NO;
|
||||||
|
inMove = NO;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSLeftMouseDragged:
|
case NSLeftMouseDragged:
|
||||||
@ -143,7 +137,7 @@
|
|||||||
GdkEvent *event;
|
GdkEvent *event;
|
||||||
|
|
||||||
private->x = content_rect.origin.x;
|
private->x = content_rect.origin.x;
|
||||||
private->y = _gdk_quartz_window_get_inverted_screen_y (content_rect.origin.y) - impl->height;
|
private->y = _gdk_quartz_window_get_inverted_screen_y (content_rect.origin.y + content_rect.size.height);
|
||||||
|
|
||||||
/* Synthesize a configure event */
|
/* Synthesize a configure event */
|
||||||
event = gdk_event_new (GDK_CONFIGURE);
|
event = gdk_event_new (GDK_CONFIGURE);
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
@interface GdkQuartzWindow : NSWindow {
|
@interface GdkQuartzWindow : NSWindow {
|
||||||
BOOL leftDown;
|
|
||||||
BOOL inMove;
|
BOOL inMove;
|
||||||
|
|
||||||
/* Manually triggered move/resize (not by the window manager) */
|
/* Manually triggered move/resize (not by the window manager) */
|
||||||
|
Reference in New Issue
Block a user