Skip to content

Commit

Permalink
fix: desktop viewer doesn't work on unix-like system
Browse files Browse the repository at this point in the history
  • Loading branch information
XZB-1248 committed Feb 1, 2023
1 parent 763cd95 commit 8d15825
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## v0.2.1

* Fix: desktop connection timeout.
* Fix: desktop viewer doesn't work on unix-like system.
* Add: show resolution of desktop.

* 修复:远程桌面连接超时。
* 修复:远程桌面在类unix系统下无法显示。
* 新增:显示远程桌面的分辨率。


Expand Down
6 changes: 4 additions & 2 deletions client/service/desktop/screenshot_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ func (s *screen) init(displayIndex int) {
}

func (s *screen) capture(img *image.RGBA, _ image.Rectangle) error {
var err error
img, err = screenshot.CaptureDisplay(displayIndex)
image, err := screenshot.CaptureDisplay(displayIndex)
if err == nil {
*img = *image
}
return err
}

Expand Down
2 changes: 1 addition & 1 deletion server/handler/desktop/desktop.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func InitDesktop(ctx *gin.Context) {
}

// desktopEventWrapper returns a eventCallback function that will
// be called when device need to send a packet to browser terminal
// be called when device need to send a packet to browser
func desktopEventWrapper(desktop *desktop) common.EventCallback {
return func(pack modules.Packet, device *melody.Session) {
if pack.Act == `RAW_DATA_ARRIVE` && pack.Data != nil {
Expand Down
2 changes: 1 addition & 1 deletion server/handler/terminal/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func InitTerminal(ctx *gin.Context) {
}

// terminalEventWrapper returns a eventCallback function that will
// be called when device need to send a packet to browser terminal
// be called when device need to send a packet to browser
func terminalEventWrapper(terminal *terminal) common.EventCallback {
return func(pack modules.Packet, device *melody.Session) {
if pack.Act == `RAW_DATA_ARRIVE` && pack.Data != nil {
Expand Down

0 comments on commit 8d15825

Please sign in to comment.