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
499e343d
Commit
499e343d
authored
Jul 11, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export the winstation and desktop structures to avoid having to write
too many accessor functions.
parent
fc200d0c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
57 deletions
+31
-57
atom.c
server/atom.c
+3
-9
clipboard.c
server/clipboard.c
+3
-3
user.h
server/user.h
+19
-4
winstation.c
server/winstation.c
+6
-41
No files found.
server/atom.c
View file @
499e343d
...
...
@@ -286,18 +286,12 @@ static atom_t find_atom( struct atom_table *table, const WCHAR *str, size_t len
static
struct
atom_table
*
get_global_table
(
struct
winstation
*
winstation
,
int
create
)
{
struct
atom_table
*
global_table
;
if
(
!
(
global_table
=
get_winstation_atom_table
(
winstation
)))
if
(
!
winstation
->
atom_table
)
{
if
(
create
)
{
global_table
=
create_table
(
HASH_SIZE
);
if
(
global_table
)
set_winstation_atom_table
(
winstation
,
global_table
);
}
if
(
create
)
winstation
->
atom_table
=
create_table
(
HASH_SIZE
);
else
set_error
(
STATUS_OBJECT_NAME_NOT_FOUND
);
}
return
global
_table
;
return
winstation
->
atom
_table
;
}
static
struct
atom_table
*
get_table
(
obj_handle_t
h
,
int
create
)
...
...
server/clipboard.c
View file @
499e343d
...
...
@@ -80,7 +80,7 @@ static struct clipboard *get_process_clipboard(void)
if
(
!
winstation
)
return
NULL
;
if
(
!
(
clipboard
=
get_winstation_clipboard
(
winstation
)
))
if
(
!
(
clipboard
=
winstation
->
clipboard
))
{
if
((
clipboard
=
alloc_object
(
&
clipboard_ops
)))
{
...
...
@@ -91,7 +91,7 @@ static struct clipboard *get_process_clipboard(void)
clipboard
->
viewer
=
0
;
clipboard
->
seqno
=
0
;
clipboard
->
seqno_timestamp
=
0
;
set_winstation_clipboard
(
winstation
,
clipboard
)
;
winstation
->
clipboard
=
clipboard
;
}
}
release_object
(
winstation
);
...
...
@@ -107,7 +107,7 @@ void cleanup_clipboard_thread(struct thread *thread)
if
(
!
winstation
)
return
;
if
((
clipboard
=
get_winstation_clipboard
(
winstation
)
))
if
((
clipboard
=
winstation
->
clipboard
))
{
if
(
thread
==
clipboard
->
open_thread
)
{
...
...
server/user.h
View file @
499e343d
...
...
@@ -40,6 +40,24 @@ enum user_object
#define DESKTOP_ATOM ((atom_t)32769)
struct
winstation
{
struct
object
obj
;
/* object header */
unsigned
int
flags
;
/* winstation flags */
struct
list
entry
;
/* entry in global winstation list */
struct
list
desktops
;
/* list of desktops of this winstation */
struct
clipboard
*
clipboard
;
/* clipboard information */
struct
atom_table
*
atom_table
;
/* global atom table */
};
struct
desktop
{
struct
object
obj
;
/* object header */
unsigned
int
flags
;
/* desktop flags */
struct
winstation
*
winstation
;
/* winstation this desktop belongs to */
struct
list
entry
;
/* entry in winstation list of desktops */
};
/* user handles functions */
extern
user_handle_t
alloc_user_handle
(
void
*
ptr
,
enum
user_object
type
);
...
...
@@ -125,10 +143,7 @@ extern void *get_class_client_ptr( struct window_class *class );
/* windows station functions */
extern
struct
winstation
*
get_process_winstation
(
struct
process
*
process
,
unsigned
int
access
);
extern
void
set_winstation_clipboard
(
struct
winstation
*
winstation
,
struct
clipboard
*
clipboard
);
extern
void
set_winstation_atom_table
(
struct
winstation
*
winstation
,
struct
atom_table
*
table
);
extern
struct
clipboard
*
get_winstation_clipboard
(
struct
winstation
*
winstation
);
extern
struct
atom_table
*
get_winstation_atom_table
(
struct
winstation
*
winstation
);
extern
struct
desktop
*
get_thread_desktop
(
struct
thread
*
thread
,
unsigned
int
access
);
extern
void
connect_process_winstation
(
struct
process
*
process
,
const
WCHAR
*
name
,
size_t
len
);
extern
void
connect_process_desktop
(
struct
process
*
process
,
const
WCHAR
*
name
,
size_t
len
);
extern
void
close_thread_desktop
(
struct
thread
*
thread
);
...
...
server/winstation.c
View file @
499e343d
...
...
@@ -35,23 +35,6 @@
#include "user.h"
#include "wine/unicode.h"
struct
winstation
{
struct
object
obj
;
/* object header */
unsigned
int
flags
;
/* winstation flags */
struct
list
entry
;
/* entry in global winstation list */
struct
list
desktops
;
/* list of desktops of this winstation */
struct
clipboard
*
clipboard
;
/* clipboard information */
struct
atom_table
*
atom_table
;
/* global atom table */
};
struct
desktop
{
struct
object
obj
;
/* object header */
unsigned
int
flags
;
/* desktop flags */
struct
winstation
*
winstation
;
/* winstation this desktop belongs to */
struct
list
entry
;
/* entry in winstation list of desktops */
};
static
struct
list
winstation_list
=
LIST_INIT
(
winstation_list
);
static
struct
winstation
*
interactive_winstation
;
...
...
@@ -155,30 +138,6 @@ struct winstation *get_process_winstation( struct process *process, unsigned int
access
,
&
winstation_ops
);
}
/* set the pointer to the (opaque) clipboard info */
void
set_winstation_clipboard
(
struct
winstation
*
winstation
,
struct
clipboard
*
clipboard
)
{
winstation
->
clipboard
=
clipboard
;
}
/* retrieve the pointer to the (opaque) clipboard info */
struct
clipboard
*
get_winstation_clipboard
(
struct
winstation
*
winstation
)
{
return
winstation
->
clipboard
;
}
/* set the pointer to the (opaque) atom table */
void
set_winstation_atom_table
(
struct
winstation
*
winstation
,
struct
atom_table
*
table
)
{
winstation
->
atom_table
=
table
;
}
/* retrieve the pointer to the (opaque) clipboard info */
struct
atom_table
*
get_winstation_atom_table
(
struct
winstation
*
winstation
)
{
return
winstation
->
atom_table
;
}
/* build the full name of a desktop object */
static
WCHAR
*
build_desktop_name
(
const
WCHAR
*
name
,
size_t
len
,
struct
winstation
*
winstation
,
size_t
*
res_len
)
...
...
@@ -263,6 +222,12 @@ static void desktop_destroy( struct object *obj )
release_object
(
desktop
->
winstation
);
}
/* retrieve the thread desktop, checking the handle access rights */
struct
desktop
*
get_thread_desktop
(
struct
thread
*
thread
,
unsigned
int
access
)
{
return
get_desktop_obj
(
thread
->
process
,
thread
->
desktop
,
access
);
}
/* connect a process to its window station */
void
connect_process_winstation
(
struct
process
*
process
,
const
WCHAR
*
name
,
size_t
len
)
{
...
...
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