Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
47e5a0bb
Commit
47e5a0bb
authored
May 23, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Store driver thread data pointer in TEB.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
08f5d2ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
macdrv.h
dlls/winemac.drv/macdrv.h
+1
-3
macdrv_main.c
dlls/winemac.drv/macdrv_main.c
+2
-6
No files found.
dlls/winemac.drv/macdrv.h
View file @
47e5a0bb
...
...
@@ -114,13 +114,11 @@ struct macdrv_thread_data
WORD
keyc2scan
[
128
];
};
extern
DWORD
thread_data_tls_index
DECLSPEC_HIDDEN
;
extern
struct
macdrv_thread_data
*
macdrv_init_thread_data
(
void
)
DECLSPEC_HIDDEN
;
static
inline
struct
macdrv_thread_data
*
macdrv_thread_data
(
void
)
{
return
TlsGetValue
(
thread_data_tls_index
)
;
return
NtUserGetThreadInfo
()
->
driver_data
;
}
...
...
dlls/winemac.drv/macdrv_main.c
View file @
47e5a0bb
...
...
@@ -46,8 +46,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(macdrv);
C_ASSERT
(
NUM_EVENT_TYPES
<=
sizeof
(
macdrv_event_mask
)
*
8
);
DWORD
thread_data_tls_index
=
TLS_OUT_OF_INDEXES
;
int
topmost_float_inactive
=
TOPMOST_FLOAT_INACTIVE_NONFULLSCREEN
;
int
capture_displays_for_fullscreen
=
0
;
BOOL
skip_single_buffer_flushes
=
FALSE
;
...
...
@@ -463,8 +461,6 @@ static BOOL process_attach(void)
setup_options
();
load_strings
(
macdrv_module
);
if
((
thread_data_tls_index
=
TlsAlloc
())
==
TLS_OUT_OF_INDEXES
)
return
FALSE
;
macdrv_err_on
=
ERR_ON
(
macdrv
);
if
(
macdrv_start_cocoa_app
(
GetTickCount64
()))
{
...
...
@@ -493,7 +489,7 @@ void macdrv_ThreadDetach(void)
CFRelease
(
data
->
keyboard_layout_uchr
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
/* clear data in case we get re-entered from user32 before the thread is truly dead */
TlsSetValue
(
thread_data_tls_index
,
NULL
)
;
NtUserGetThreadInfo
()
->
driver_data
=
0
;
}
}
...
...
@@ -556,7 +552,7 @@ struct macdrv_thread_data *macdrv_init_thread_data(void)
macdrv_compute_keyboard_layout
(
data
);
set_queue_display_fd
(
macdrv_get_event_queue_fd
(
data
->
queue
));
TlsSetValue
(
thread_data_tls_index
,
data
)
;
NtUserGetThreadInfo
()
->
driver_data
=
data
;
NtUserActivateKeyboardLayout
(
data
->
active_keyboard_layout
,
0
);
return
data
;
...
...
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