Use init display index as the primary index.
But when displays changed, the primary display may also changes.
No need to change the old primary index.
But we need to make sure that the old primary index does not exceed the display number.
Signed-off-by: fufesou <linlong1266@gmail.com>
* add custom password to unlock settings
* If not set, use admin password; if set, use custom settings password.
* At least 4 characters.
* Set with gui or command line.
Signed-off-by: 21pages <sunboeasy@gmail.com>
* Update cn.rs
---------
Signed-off-by: 21pages <sunboeasy@gmail.com>
Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
refreshCurrentUser will be called at these 2 position:
1. runMainApp or runMobileApp in main.dart
2. when connect status is ready
Both of these two happens at startup, when connect status is ready and startup time < 5 seconds, not call refreshCurrentUser
Signed-off-by: 21pages <sunboeasy@gmail.com>
1. Keep window pos
2. Do some init in StatefulWidget constructor.
If try init in its state class, it may be too late. Because I see the
init function is called after building the widget tree.
Signed-off-by: fufesou <linlong1266@gmail.com>
Because rgba buffer render doesn't support multi display, when switch to
multi display, it is possible that rgba.valid has been set to valid but
nextRgab is not called, when switching back to single display,
rgba.valid is still true.
Fix by rgba buffer, rgba texture and gpu texture using different messages.
Signed-off-by: 21pages <sunboeasy@gmail.com>
Multiple dylib instances will cause some global instances to be invalid.
eg. lazy_static objects in rust side, will be created more than once.
Signed-off-by: fufesou <linlong1266@gmail.com>
1. Merge code of mobile and desktop virtual display menu.
2. Mobile add seperate resolution menu, only support changing
resolutions.
3. Android add proxy setting
Signed-off-by: 21pages <sunboeasy@gmail.com>
`peers.map((p) async {})` is not sync and peers are loaded before deletion.
```
let mut peers = config::LanPeers::load().peers;
peers.retain(|x| x.id != id);
```
Signed-off-by: 21pages <sunboeasy@gmail.com>
* mobile add view mode menu, disable same menus as desktop
* show forbidden cursor when not view mode && no keyboard permission &&
not show remote cursor
* hide keyboard/mouse bottom action when keyboard disabled
* fix not listen keyboard permission change
* mobile missing changing resolution and http proxy setting, will add if
needed.
Signed-off-by: 21pages <sunboeasy@gmail.com>