server: Support waiting on screen buffer handles.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
459d37643e
commit
2eb8644426
|
@ -1019,7 +1019,6 @@ static void test_wait(HANDLE input, HANDLE orig_output)
|
|||
res = WaitForSingleObject(input, 0);
|
||||
ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %x\n", res);
|
||||
res = WaitForSingleObject(output, 0);
|
||||
todo_wine
|
||||
ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %x\n", res);
|
||||
res = WaitForSingleObject(orig_output, 0);
|
||||
ok(res == WAIT_TIMEOUT, "WaitForSingleObject returned %x\n", res);
|
||||
|
@ -1027,7 +1026,6 @@ static void test_wait(HANDLE input, HANDLE orig_output)
|
|||
ok(status == STATUS_TIMEOUT || broken(status == STATUS_ACCESS_DENIED /* win2k8 */),
|
||||
"NtWaitForSingleObject returned %x\n", status);
|
||||
status = NtWaitForSingleObject(output, FALSE, &zero);
|
||||
todo_wine
|
||||
ok(status == STATUS_TIMEOUT || broken(status == STATUS_ACCESS_DENIED /* win2k8 */),
|
||||
"NtWaitForSingleObject returned %x\n", status);
|
||||
|
||||
|
@ -1037,7 +1035,6 @@ static void test_wait(HANDLE input, HANDLE orig_output)
|
|||
res = WaitForSingleObject(input, 0);
|
||||
ok(!res, "WaitForSingleObject returned %x\n", res);
|
||||
res = WaitForSingleObject(output, 0);
|
||||
todo_wine
|
||||
ok(!res, "WaitForSingleObject returned %x\n", res);
|
||||
res = WaitForSingleObject(orig_output, 0);
|
||||
ok(!res, "WaitForSingleObject returned %x\n", res);
|
||||
|
@ -1045,7 +1042,6 @@ static void test_wait(HANDLE input, HANDLE orig_output)
|
|||
ok(!status || broken(status == STATUS_ACCESS_DENIED /* win2k8 */),
|
||||
"NtWaitForSingleObject returned %x\n", status);
|
||||
status = NtWaitForSingleObject(output, FALSE, &zero);
|
||||
todo_wine
|
||||
ok(!status || broken(status == STATUS_ACCESS_DENIED /* win2k8 */),
|
||||
"NtWaitForSingleObject returned %x\n", status);
|
||||
|
||||
|
|
|
@ -208,6 +208,7 @@ struct screen_buffer
|
|||
|
||||
static void screen_buffer_dump( struct object *obj, int verbose );
|
||||
static void screen_buffer_destroy( struct object *obj );
|
||||
static int screen_buffer_add_queue( struct object *obj, struct wait_queue_entry *entry );
|
||||
static struct fd *screen_buffer_get_fd( struct object *obj );
|
||||
static struct object *screen_buffer_open_file( struct object *obj, unsigned int access,
|
||||
unsigned int sharing, unsigned int options );
|
||||
|
@ -217,7 +218,7 @@ static const struct object_ops screen_buffer_ops =
|
|||
sizeof(struct screen_buffer), /* size */
|
||||
screen_buffer_dump, /* dump */
|
||||
no_get_type, /* get_type */
|
||||
no_add_queue, /* add_queue */
|
||||
screen_buffer_add_queue, /* add_queue */
|
||||
NULL, /* remove_queue */
|
||||
NULL, /* signaled */
|
||||
NULL, /* satisfied */
|
||||
|
@ -706,6 +707,17 @@ static struct object *screen_buffer_open_file( struct object *obj, unsigned int
|
|||
return grab_object( obj );
|
||||
}
|
||||
|
||||
static int screen_buffer_add_queue( struct object *obj, struct wait_queue_entry *entry )
|
||||
{
|
||||
struct screen_buffer *screen_buffer = (struct screen_buffer*)obj;
|
||||
if (!screen_buffer->input)
|
||||
{
|
||||
set_error( STATUS_ACCESS_DENIED );
|
||||
return 0;
|
||||
}
|
||||
return add_queue( &screen_buffer->input->obj, entry );
|
||||
}
|
||||
|
||||
static struct fd *screen_buffer_get_fd( struct object *obj )
|
||||
{
|
||||
struct screen_buffer *screen_buffer = (struct screen_buffer*)obj;
|
||||
|
|
Loading…
Reference in New Issue