Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ecf217bb
Commit
ecf217bb
authored
Apr 04, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Update the cursor on the clipping window while it's mapped.
parent
886ae4c3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
4 deletions
+25
-4
event.c
dlls/winex11.drv/event.c
+16
-1
mouse.c
dlls/winex11.drv/mouse.c
+7
-3
window.c
dlls/winex11.drv/window.c
+1
-0
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
No files found.
dlls/winex11.drv/event.c
View file @
ecf217bb
...
@@ -91,6 +91,7 @@ static void X11DRV_FocusIn( HWND hwnd, XEvent *event );
...
@@ -91,6 +91,7 @@ static void X11DRV_FocusIn( HWND hwnd, XEvent *event );
static
void
X11DRV_FocusOut
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_FocusOut
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_Expose
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_Expose
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_MapNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_MapNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_UnmapNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_ReparentNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_ReparentNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_ConfigureNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_ConfigureNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_PropertyNotify
(
HWND
hwnd
,
XEvent
*
event
);
static
void
X11DRV_PropertyNotify
(
HWND
hwnd
,
XEvent
*
event
);
...
@@ -124,7 +125,7 @@ static struct event_handler handlers[MAX_EVENT_HANDLERS] =
...
@@ -124,7 +125,7 @@ static struct event_handler handlers[MAX_EVENT_HANDLERS] =
/* VisibilityNotify */
/* VisibilityNotify */
/* CreateNotify */
/* CreateNotify */
{
DestroyNotify
,
X11DRV_DestroyNotify
},
{
DestroyNotify
,
X11DRV_DestroyNotify
},
/* UnmapNotify */
{
UnmapNotify
,
X11DRV_UnmapNotify
},
{
MapNotify
,
X11DRV_MapNotify
},
{
MapNotify
,
X11DRV_MapNotify
},
/* MapRequest */
/* MapRequest */
{
ReparentNotify
,
X11DRV_ReparentNotify
},
{
ReparentNotify
,
X11DRV_ReparentNotify
},
...
@@ -801,6 +802,11 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event )
...
@@ -801,6 +802,11 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event )
{
{
struct
x11drv_win_data
*
data
;
struct
x11drv_win_data
*
data
;
if
(
event
->
xany
.
window
==
clip_window
)
{
clipping_cursor
=
1
;
return
;
}
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
if
(
!
data
->
mapped
||
data
->
embedded
)
return
;
if
(
!
data
->
mapped
||
data
->
embedded
)
return
;
...
@@ -812,6 +818,15 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event )
...
@@ -812,6 +818,15 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event )
}
}
/**********************************************************************
* X11DRV_UnmapNotify
*/
static
void
X11DRV_UnmapNotify
(
HWND
hwnd
,
XEvent
*
event
)
{
if
(
event
->
xany
.
window
==
clip_window
)
clipping_cursor
=
0
;
}
/***********************************************************************
/***********************************************************************
* is_net_wm_state_maximized
* is_net_wm_state_maximized
*/
*/
...
...
dlls/winex11.drv/mouse.c
View file @
ecf217bb
...
@@ -884,7 +884,8 @@ void CDECL X11DRV_SetCursor( HCURSOR handle )
...
@@ -884,7 +884,8 @@ void CDECL X11DRV_SetCursor( HCURSOR handle )
GetTickCount
()
-
last_cursor_change
>
100
)
GetTickCount
()
-
last_cursor_change
>
100
)
{
{
last_cursor_change
=
GetTickCount
();
last_cursor_change
=
GetTickCount
();
if
(
cursor_window
)
SendNotifyMessageW
(
cursor_window
,
WM_X11DRV_SET_CURSOR
,
0
,
(
LPARAM
)
handle
);
if
(
clipping_cursor
)
set_window_cursor
(
clip_window
,
handle
);
else
if
(
cursor_window
)
SendNotifyMessageW
(
cursor_window
,
WM_X11DRV_SET_CURSOR
,
0
,
(
LPARAM
)
handle
);
}
}
}
}
...
@@ -958,12 +959,14 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip )
...
@@ -958,12 +959,14 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip )
if
(
!
XGrabPointer
(
display
,
clip_window
,
False
,
if
(
!
XGrabPointer
(
display
,
clip_window
,
False
,
PointerMotionMask
|
ButtonPressMask
|
ButtonReleaseMask
,
PointerMotionMask
|
ButtonPressMask
|
ButtonReleaseMask
,
GrabModeAsync
,
GrabModeAsync
,
clip_window
,
None
,
CurrentTime
))
GrabModeAsync
,
GrabModeAsync
,
clip_window
,
None
,
CurrentTime
))
clipping_cursor
=
1
;
wine_tsx11_unlock
();
if
(
clipping_cursor
)
{
{
wine_tsx11_unlock
();
clip_rect
=
*
clip
;
clip_rect
=
*
clip
;
return
TRUE
;
return
TRUE
;
}
}
wine_tsx11_unlock
();
}
}
}
}
...
@@ -972,6 +975,7 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip )
...
@@ -972,6 +975,7 @@ BOOL CDECL X11DRV_ClipCursor( LPCRECT clip )
wine_tsx11_lock
();
wine_tsx11_lock
();
XUnmapWindow
(
display
,
clip_window
);
XUnmapWindow
(
display
,
clip_window
);
wine_tsx11_unlock
();
wine_tsx11_unlock
();
clipping_cursor
=
0
;
return
TRUE
;
return
TRUE
;
}
}
...
...
dlls/winex11.drv/window.c
View file @
ecf217bb
...
@@ -70,6 +70,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
...
@@ -70,6 +70,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
/* cursor clipping window */
/* cursor clipping window */
Window
clip_window
=
0
;
Window
clip_window
=
0
;
int
clipping_cursor
=
0
;
/* X context to associate a hwnd to an X window */
/* X context to associate a hwnd to an X window */
XContext
winContext
=
0
;
XContext
winContext
=
0
;
...
...
dlls/winex11.drv/x11drv.h
View file @
ecf217bb
...
@@ -586,6 +586,7 @@ static inline size_t get_property_size( int format, unsigned long count )
...
@@ -586,6 +586,7 @@ static inline size_t get_property_size( int format, unsigned long count )
extern
Visual
*
visual
;
extern
Visual
*
visual
;
extern
Window
root_window
;
extern
Window
root_window
;
extern
Window
clip_window
;
extern
Window
clip_window
;
extern
int
clipping_cursor
;
extern
unsigned
int
screen_width
;
extern
unsigned
int
screen_width
;
extern
unsigned
int
screen_height
;
extern
unsigned
int
screen_height
;
extern
unsigned
int
screen_bpp
;
extern
unsigned
int
screen_bpp
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment