This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch feature/rootless-mode in repository x2gokdrive. from cd6bb1d Handling minimizing windows. new 71c733e Reinitiaization of windows after client reconnected. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: x2gokdriveremote.c | 64 ++++++++++++++++++++++-------------------------------- x2gokdriveremote.h | 1 + 2 files changed, 27 insertions(+), 38 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdrive.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch feature/rootless-mode in repository x2gokdrive. commit 71c733e4a008b6a5ff472ebd7381ea7417cb785b Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Thu Feb 10 09:29:09 2022 -0600 Reinitiaization of windows after client reconnected. --- x2gokdriveremote.c | 64 ++++++++++++++++++++++-------------------------------- x2gokdriveremote.h | 1 + 2 files changed, 27 insertions(+), 38 deletions(-) diff --git a/x2gokdriveremote.c b/x2gokdriveremote.c index 58b262b..b92d33b 100644 --- a/x2gokdriveremote.c +++ b/x2gokdriveremote.c @@ -2055,6 +2055,30 @@ void setAgentState(int state) remoteVars.agentState=state; } +void delete_all_windows(void) +{ + //sendqueue_mutex should be locked here + struct remoteWindow* rwin=remoteVars.windowList; + struct remoteWindow* tmp; + while(rwin) + { + //remove window from list and free resources + //EPHYR_DBG("release window %p, %s",rwin->ptr, rwin->name); + tmp=rwin; + rwin=rwin->next; + if(tmp->name) + { + free(tmp->name); + } + if(tmp->icon_png) + { + free(tmp->icon_png); + } + free(tmp); + } + remoteVars.windowList=NULL; +} + void disconnect_client(void) { EPHYR_DBG("DISCONNECTING CLIENT, DOING SOME CLEAN UP"); @@ -2062,6 +2086,7 @@ void disconnect_client(void) pthread_mutex_lock(&remoteVars.sendqueue_mutex); remoteVars.client_connected=FALSE; setAgentState(SUSPENDED); + delete_all_windows(); clear_send_queue(); clear_frame_cache(0); freeCursors(); @@ -4342,44 +4367,6 @@ void remote_check_rootless_windows_for_updates(KdScreenInfo *screen) rwin->foundInWinTree=FALSE; rwin=rwin->next; } - /* - // EPHYR_DBG("END TREE CHECK"); - //if client is not connected, release deleted windows here - if(remoteVars.client_connected==FALSE) - { - //sendqueue mutex is locked here - prev=NULL; - rwin=remoteVars.windowList; - while(rwin) - { - if(rwin->state==WDEL) - { - //remove window from list and free resources -// EPHYR_DBG("release window %p, %s",rwin->ptr, rwin->name); - if(rwin==remoteVars.windowList) - { - remoteVars.windowList=rwin->next; - } - if(prev) - { - prev->next=rwin->next; - } - tmp=rwin; - rwin=rwin->next; - if(tmp->name) - { - free(tmp->name); - } - free(tmp); - } - else - { - prev=rwin; - rwin=rwin->next; - } - } - remoteVars.windowsUpdated=FALSE; - }*/ pthread_mutex_unlock(&remoteVars.sendqueue_mutex); } @@ -4633,6 +4620,7 @@ void rebuild_caches(void) clear_send_queue(); clear_frame_cache(0); freeCursors(); + delete_all_windows(); remoteVars.cache_rebuilt=TRUE; pthread_cond_signal(&remoteVars.have_sendqueue_cond); pthread_mutex_unlock(&remoteVars.sendqueue_mutex); diff --git a/x2gokdriveremote.h b/x2gokdriveremote.h index eb67378..a6453ab 100644 --- a/x2gokdriveremote.h +++ b/x2gokdriveremote.h @@ -483,6 +483,7 @@ void readInputSelectionHeader(char* buff); void pollEvents(void); #endif /* XORG_VERSION_CURRENT */ void clear_frame_cache(uint32_t max_elements); +void delete_all_windows(void); uint32_t calculate_crc(uint32_t width, uint32_t height, int32_t dx, int32_t dy); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdrive.git