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
e705764c
Commit
e705764c
authored
Jun 26, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Pass the display as parameter to a few more functions instead of using thread_display().
parent
06a1407c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
clipboard.c
dlls/winex11.drv/clipboard.c
+0
-0
event.c
dlls/winex11.drv/event.c
+7
-7
keyboard.c
dlls/winex11.drv/keyboard.c
+1
-1
systray.c
dlls/winex11.drv/systray.c
+4
-4
No files found.
dlls/winex11.drv/clipboard.c
View file @
e705764c
This diff is collapsed.
Click to expand it.
dlls/winex11.drv/event.c
View file @
e705764c
...
...
@@ -441,7 +441,7 @@ static inline BOOL can_activate_window( HWND hwnd )
/**********************************************************************
* set_focus
*/
static
void
set_focus
(
HWND
hwnd
,
Time
time
)
static
void
set_focus
(
Display
*
display
,
HWND
hwnd
,
Time
time
)
{
HWND
focus
;
Window
win
;
...
...
@@ -457,7 +457,7 @@ static void set_focus( HWND hwnd, Time time )
{
TRACE
(
"setting focus to %p (%lx) time=%ld
\n
"
,
focus
,
win
,
time
);
wine_tsx11_lock
();
XSetInputFocus
(
thread_display
()
,
win
,
RevertToParent
,
time
);
XSetInputFocus
(
display
,
win
,
RevertToParent
,
time
);
wine_tsx11_unlock
();
}
}
...
...
@@ -532,7 +532,7 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event )
MAKELONG
(
HTCAPTION
,
WM_LBUTTONDOWN
)
);
if
(
ma
!=
MA_NOACTIVATEANDEAT
&&
ma
!=
MA_NOACTIVATE
)
{
set_focus
(
hwnd
,
event_time
);
set_focus
(
event
->
display
,
hwnd
,
event_time
);
return
;
}
}
...
...
@@ -541,7 +541,7 @@ static void handle_wm_protocols( HWND hwnd, XClientMessageEvent *event )
if
(
hwnd
)
hwnd
=
GetAncestor
(
hwnd
,
GA_ROOT
);
if
(
!
hwnd
)
hwnd
=
GetActiveWindow
();
if
(
!
hwnd
)
hwnd
=
last_focus
;
if
(
hwnd
&&
can_activate_window
(
hwnd
))
set_focus
(
hwnd
,
event_time
);
if
(
hwnd
&&
can_activate_window
(
hwnd
))
set_focus
(
event
->
display
,
hwnd
,
event_time
);
}
else
if
(
protocol
==
x11drv_atom
(
_NET_WM_PING
))
{
...
...
@@ -599,7 +599,7 @@ static void X11DRV_FocusIn( HWND hwnd, XEvent *xev )
if
(
hwnd
)
hwnd
=
GetAncestor
(
hwnd
,
GA_ROOT
);
if
(
!
hwnd
)
hwnd
=
GetActiveWindow
();
if
(
!
hwnd
)
hwnd
=
x11drv_thread_data
()
->
last_focus
;
if
(
hwnd
&&
can_activate_window
(
hwnd
))
set_focus
(
hwnd
,
CurrentTime
);
if
(
hwnd
&&
can_activate_window
(
hwnd
))
set_focus
(
event
->
display
,
hwnd
,
CurrentTime
);
}
else
SetForegroundWindow
(
hwnd
);
}
...
...
@@ -639,10 +639,10 @@ static void X11DRV_FocusOut( HWND hwnd, XEvent *xev )
getting the focus is a Wine window */
wine_tsx11_lock
();
XGetInputFocus
(
thread_display
()
,
&
focus_win
,
&
revert
);
XGetInputFocus
(
event
->
display
,
&
focus_win
,
&
revert
);
if
(
focus_win
)
{
if
(
XFindContext
(
thread_display
()
,
focus_win
,
winContext
,
(
char
**
)
&
hwnd_tmp
)
!=
0
)
if
(
XFindContext
(
event
->
display
,
focus_win
,
winContext
,
(
char
**
)
&
hwnd_tmp
)
!=
0
)
focus_win
=
0
;
}
wine_tsx11_unlock
();
...
...
dlls/winex11.drv/keyboard.c
View file @
e705764c
...
...
@@ -1937,7 +1937,7 @@ void X11DRV_MappingNotify( HWND dummy, XEvent *event )
wine_tsx11_lock
();
XRefreshKeyboardMapping
(
&
event
->
xmapping
);
wine_tsx11_unlock
();
X11DRV_InitKeyboard
(
thread_display
()
);
X11DRV_InitKeyboard
(
event
->
xmapping
.
display
);
hwnd
=
GetFocus
();
if
(
!
hwnd
)
hwnd
=
GetActiveWindow
();
...
...
dlls/winex11.drv/systray.c
View file @
e705764c
...
...
@@ -230,9 +230,8 @@ static Window get_systray_selection_owner( Display *display )
/* dock the given X window with the NETWM system tray */
static
void
dock_systray_window
(
HWND
hwnd
,
Window
systray_window
)
static
void
dock_systray_window
(
Display
*
display
,
HWND
hwnd
,
Window
systray_window
)
{
Display
*
display
=
thread_display
();
struct
x11drv_win_data
*
data
;
XEvent
ev
;
XSetWindowAttributes
attr
;
...
...
@@ -284,6 +283,7 @@ static BOOL show_icon( struct tray_icon *icon )
RECT
rect
;
static
BOOL
class_registered
;
Window
systray_window
;
Display
*
display
=
thread_display
();
TRACE
(
"id=0x%x, hwnd=%p
\n
"
,
icon
->
id
,
icon
->
owner
);
...
...
@@ -308,7 +308,7 @@ static BOOL show_icon( struct tray_icon *icon )
class_registered
=
TRUE
;
}
if
(
!
(
systray_window
=
get_systray_selection_owner
(
thread_display
()
)))
return
FALSE
;
if
(
!
(
systray_window
=
get_systray_selection_owner
(
display
)))
return
FALSE
;
rect
.
left
=
0
;
rect
.
top
=
0
;
...
...
@@ -320,7 +320,7 @@ static BOOL show_icon( struct tray_icon *icon )
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
NULL
,
NULL
,
NULL
,
icon
);
create_tooltip
(
icon
);
dock_systray_window
(
icon
->
window
,
systray_window
);
dock_systray_window
(
display
,
icon
->
window
,
systray_window
);
SetTimer
(
icon
->
window
,
1
,
1000
,
NULL
);
ShowWindow
(
icon
->
window
,
SW_SHOWNA
);
return
TRUE
;
...
...
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