Commit 2eb86444 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

server: Support waiting on screen buffer handles.

parent 459d3764
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment