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
8b5e0bdf
Commit
8b5e0bdf
authored
Aug 27, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Move setting current screen_buffer into a helper.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e01ef813
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
28 deletions
+7
-28
console.c
server/console.c
+7
-28
No files found.
server/console.c
View file @
8b5e0bdf
...
...
@@ -594,11 +594,14 @@ static void disconnect_console_server( struct console_server *server )
}
}
static
void
generate_sb_initial_events
(
struct
console_input
*
console_input
)
static
void
set_active_screen_buffer
(
struct
console_input
*
console_input
,
struct
screen_buffer
*
screen_buffer
)
{
struct
screen_buffer
*
screen_buffer
=
console_input
->
active
;
struct
condrv_renderer_event
evt
;
if
(
console_input
->
active
==
screen_buffer
)
return
;
if
(
console_input
->
active
)
release_object
(
console_input
->
active
);
console_input
->
active
=
(
struct
screen_buffer
*
)
grab_object
(
screen_buffer
);
evt
.
event
=
CONSOLE_RENDERER_SB_RESIZE_EVENT
;
evt
.
u
.
resize
.
width
=
screen_buffer
->
width
;
evt
.
u
.
resize
.
height
=
screen_buffer
->
height
;
...
...
@@ -689,11 +692,7 @@ static struct object *create_console_output( struct console_input *console_input
memcpy
(
&
screen_buffer
->
data
[
i
*
screen_buffer
->
width
],
screen_buffer
->
data
,
screen_buffer
->
width
*
sizeof
(
char_info_t
)
);
if
(
!
console_input
->
active
)
{
console_input
->
active
=
(
struct
screen_buffer
*
)
grab_object
(
screen_buffer
);
generate_sb_initial_events
(
console_input
);
}
if
(
!
console_input
->
active
)
set_active_screen_buffer
(
console_input
,
screen_buffer
);
return
&
screen_buffer
->
obj
;
}
...
...
@@ -1270,21 +1269,6 @@ static void screen_buffer_destroy( struct object *obj )
assert
(
obj
->
ops
==
&
screen_buffer_ops
);
list_remove
(
&
screen_buffer
->
entry
);
if
(
screen_buffer
->
input
&&
screen_buffer
->
input
->
active
==
screen_buffer
)
{
struct
screen_buffer
*
sb
;
screen_buffer
->
input
->
active
=
NULL
;
LIST_FOR_EACH_ENTRY
(
sb
,
&
screen_buffer_list
,
struct
screen_buffer
,
entry
)
{
if
(
sb
->
input
==
screen_buffer
->
input
)
{
sb
->
input
->
active
=
sb
;
break
;
}
}
}
if
(
screen_buffer
->
fd
)
release_object
(
screen_buffer
->
fd
);
free
(
screen_buffer
->
data
);
free
(
screen_buffer
->
font
.
face_name
);
...
...
@@ -1958,12 +1942,7 @@ static int screen_buffer_ioctl( struct fd *fd, ioctl_code_t code, struct async *
return
0
;
}
if
(
screen_buffer
!=
screen_buffer
->
input
->
active
)
{
if
(
screen_buffer
->
input
->
active
)
release_object
(
screen_buffer
->
input
->
active
);
screen_buffer
->
input
->
active
=
(
struct
screen_buffer
*
)
grab_object
(
screen_buffer
);
generate_sb_initial_events
(
screen_buffer
->
input
);
}
set_active_screen_buffer
(
screen_buffer
->
input
,
screen_buffer
);
return
1
;
case
IOCTL_CONDRV_FILL_OUTPUT
:
...
...
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