set rgba_data.valid to false when open a new single display on the old session (#11078)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
5f521c80a7
commit
b2cc9eac23
@ -2036,6 +2036,8 @@ pub mod sessions {
|
|||||||
// This operation will also cause the peer to send a switch display message.
|
// This operation will also cause the peer to send a switch display message.
|
||||||
// The switch display message will contain `SupportedResolutions`, which is useful when changing resolutions.
|
// The switch display message will contain `SupportedResolutions`, which is useful when changing resolutions.
|
||||||
s.switch_display(value[0]);
|
s.switch_display(value[0]);
|
||||||
|
// Reset the valid flag of the display.
|
||||||
|
s.next_rgba(value[0] as usize);
|
||||||
|
|
||||||
if !is_desktop {
|
if !is_desktop {
|
||||||
s.capture_displays(vec![], vec![], value);
|
s.capture_displays(vec![], vec![], value);
|
||||||
@ -2113,6 +2115,11 @@ pub mod sessions {
|
|||||||
.write()
|
.write()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.insert(session_id, h);
|
.insert(session_id, h);
|
||||||
|
// If the session is a single display session, it may be a software rgba rendered display.
|
||||||
|
// If this is the second time the display is opened, the old valid flag may be true.
|
||||||
|
if displays.len() == 1 {
|
||||||
|
s.ui_handler.next_rgba(displays[0] as usize);
|
||||||
|
}
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user