{"action":"created","comment":{"url":"https://api.github.com/repos/reactos/reactos/pulls/comments/245138471","pull_request_review_id":189188064,"id":245138471,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTEzODQ3MQ==","diff_hunk":"@@ -176,20 +442,85 @@ BOOL FASTCALL IntMakeHungWindowGhosted(HWND hwndHung)\n \n     if (IntIsGhostWindow(pHungWnd))\n     {\n-        DPRINT1(\"IntIsGhostWindow\\n\");\n+        ERR(\"IntIsGhostWindow (hwndHung: %p)\\n\", (void *)hwndHung);\n         return FALSE;   // ghost window cannot be ghosted\n     }\n \n-    if (IntGhostWindowFromHungWindow(pHungWnd))\n+    // \"Shell_TrayWnd\" is a special window for Taskbar.\n+    if (IntIsShellTrayWnd(pHungWnd))\n     {\n-        DPRINT(\"Already ghosting\\n\");\n-        return FALSE;   // already ghosting\n+        TRACE(\"IntIsShellTrayWnd (hwndHung: %p)\\n\", (void *)hwndHung);\n+        return FALSE;   // Shell_TrayWnd\n+    }\n+\n+    // \"Progman\" is a special window for Desktop.\n+    if (IntIsProgmanWnd(pHungWnd))\n+    {\n+        TRACE(\"IntIsProgmanWnd (hwndHung: %p)\\n\", (void *)hwndHung);\n+        return FALSE;   // Progman\n     }\n \n-    // TODO: Find a way to pass the hwnd of pHungWnd to the ghost thread as we can't pass parameters directly\n+    // create ghost window and add to list\n+    pEntry = IntCreateGhostAndAddToList(hwndHung);\n+    if (!pEntry)\n+    {\n+        ERR(\"IntCreateGhostAndAddToList failed: %p\\n\", (void *)hwndHung);\n+        return FALSE;\n+    }\n \n     if (!gptiGhostThread)\n-        UserCreateSystemThread(ST_GHOST_THREAD);\n+    {\n+        if (gpGhostStartupEvent == NULL)\n+        {\n+            // create event\n+            gpGhostStartupEvent = ExAllocatePoolWithTag(NonPagedPool,\n+                                                        sizeof(KEVENT),\n+                                                        USERTAG_GHOST);\n+            if (!gpGhostStartupEvent)\n+            {\n+                ERR(\"Unable to allocate event\\n\");\n+                return FALSE;   // creation failed\n+            }\n+        }\n+        KeInitializeEvent(gpGhostStartupEvent, NotificationEvent, FALSE);\n+\n+        // create ghost thread\n+        if (!UserCreateSystemThread(ST_GHOST_THREAD))\n+        {\n+            ERR(\"Unable to create ghost thread for pHungWnd(%p), hwndHung(%p)\\n\",\n+                (void *)pHungWnd, (void *)hwndHung);\n+            IntDeleteGhostEntry(hwndHung);\n+            return FALSE;   // creation failed\n+        }\n+\n+        // wait for event\n+        UserLeave();\n+        Status = KeWaitForSingleObject(gpGhostStartupEvent, UserRequest, UserMode, FALSE, NULL);\n+        UserEnterExclusive();\n+\n+        if (Status == STATUS_USER_APC)\n+        {\n+            ERR(\"KeWaitForSingleObject failed: Status: 0x%08lx\\n\", Status);\n+            IntDeleteGhostEntry(hwndHung);\n+            return FALSE;\n+        }\n+\n+        // delete gpGhostStartupEvent\n+        ExFreePoolWithTag(gpGhostStartupEvent, USERTAG_GHOST);","path":"win32ss/user/ntuser/ghost.c","position":553,"original_position":553,"commit_id":"ee3ff2e5765493c6e99a280c0b604c2113cb4baf","original_commit_id":"ee3ff2e5765493c6e99a280c0b604c2113cb4baf","user":{"login":"ThFabba","id":18138474,"node_id":"MDQ6VXNlcjE4MTM4NDc0","avatar_url":"https://avatars3.githubusercontent.com/u/18138474?v=4","gravatar_id":"","url":"https://api.github.com/users/ThFabba","html_url":"https://github.com/ThFabba","followers_url":"https://api.github.com/users/ThFabba/followers","following_url":"https://api.github.com/users/ThFabba/following{/other_user}","gists_url":"https://api.github.com/users/ThFabba/gists{/gist_id}","starred_url":"https://api.github.com/users/ThFabba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThFabba/subscriptions","organizations_url":"https://api.github.com/users/ThFabba/orgs","repos_url":"https://api.github.com/users/ThFabba/repos","events_url":"https://api.github.com/users/ThFabba/events{/privacy}","received_events_url":"https://api.github.com/users/ThFabba/received_events","type":"User","site_admin":false},"body":"My mistake, sorry for the back and forth -- but it now occurs to me that two threads can get here. So this (and the assignment to NULL in the next line) was better at the end of the ghost thread, near `gptiGhostThread = NULL;`\r\n\r\nThe rest of the thread synchronization stuff looks safe to me now. Woo!","created_at":"2019-01-03T21:26:38Z","updated_at":"2019-01-03T21:44:08Z","html_url":"https://github.com/reactos/reactos/pull/1178#discussion_r245138471","pull_request_url":"https://api.github.com/repos/reactos/reactos/pulls/1178","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/reactos/reactos/pulls/comments/245138471"},"html":{"href":"https://github.com/reactos/reactos/pull/1178#discussion_r245138471"},"pull_request":{"href":"https://api.github.com/repos/reactos/reactos/pulls/1178"}}},"pull_request":{"url":"https://api.github.com/repos/reactos/reactos/pulls/1178","id":240610234,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwNjEwMjM0","html_url":"https://github.com/reactos/reactos/pull/1178","diff_url":"https://github.com/reactos/reactos/pull/1178.diff","patch_url":"https://github.com/reactos/reactos/pull/1178.patch","issue_url":"https://api.github.com/repos/reactos/reactos/issues/1178","number":1178,"state":"open","locked":false,"title":"[USER32][NTUSER] Implement window ghosting feature (Retrial of #1123)","user":{"login":"katahiromz","id":2107452,"node_id":"MDQ6VXNlcjIxMDc0NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/2107452?v=4","gravatar_id":"","url":"https://api.github.com/users/katahiromz","html_url":"https://github.com/katahiromz","followers_url":"https://api.github.com/users/katahiromz/followers","following_url":"https://api.github.com/users/katahiromz/following{/other_user}","gists_url":"https://api.github.com/users/katahiromz/gists{/gist_id}","starred_url":"https://api.github.com/users/katahiromz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katahiromz/subscriptions","organizations_url":"https://api.github.com/users/katahiromz/orgs","repos_url":"https://api.github.com/users/katahiromz/repos","events_url":"https://api.github.com/users/katahiromz/events{/privacy}","received_events_url":"https://api.github.com/users/katahiromz/received_events","type":"User","site_admin":false},"body":"## Purpose\r\nThis PR is retrial of #1123.\r\nJIRA issue: [CORE-11944](https://jira.reactos.org/browse/CORE-11944)\r\nPlease use CORE-11944 HaltWindow test program for testing.\r\n```bat\r\nset DEBUGCHANNEL=+UserMsg,+UserMsgQ,+UserCsr,+UserInput\r\n```\r\n## TODO\r\n- [x] Server Side Window Procedure.\r\n- [ ] Fix the strange image.\r\n- [ ] Fix the errors and freezing.\r\n- [x] Use Linked List.\r\n- [ ] Do test.","created_at":"2018-12-22T02:03:08Z","updated_at":"2019-01-03T21:44:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5bfe7dd2d24e263e2686ad61ed2190ea6d49a0ca","assignee":null,"assignees":[],"requested_reviewers":[{"login":"yagoulas","id":7785499,"node_id":"MDQ6VXNlcjc3ODU0OTk=","avatar_url":"https://avatars3.githubusercontent.com/u/7785499?v=4","gravatar_id":"","url":"https://api.github.com/users/yagoulas","html_url":"https://github.com/yagoulas","followers_url":"https://api.github.com/users/yagoulas/followers","following_url":"https://api.github.com/users/yagoulas/following{/other_user}","gists_url":"https://api.github.com/users/yagoulas/gists{/gist_id}","starred_url":"https://api.github.com/users/yagoulas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yagoulas/subscriptions","organizations_url":"https://api.github.com/users/yagoulas/orgs","repos_url":"https://api.github.com/users/yagoulas/repos","events_url":"https://api.github.com/users/yagoulas/events{/privacy}","received_events_url":"https://api.github.com/users/yagoulas/received_events","type":"User","site_admin":false},{"login":"jimtabor","id":32499118,"node_id":"MDQ6VXNlcjMyNDk5MTE4","avatar_url":"https://avatars3.githubusercontent.com/u/32499118?v=4","gravatar_id":"","url":"https://api.github.com/users/jimtabor","html_url":"https://github.com/jimtabor","followers_url":"https://api.github.com/users/jimtabor/followers","following_url":"https://api.github.com/users/jimtabor/following{/other_user}","gists_url":"https://api.github.com/users/jimtabor/gists{/gist_id}","starred_url":"https://api.github.com/users/jimtabor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimtabor/subscriptions","organizations_url":"https://api.github.com/users/jimtabor/orgs","repos_url":"https://api.github.com/users/jimtabor/repos","events_url":"https://api.github.com/users/jimtabor/events{/privacy}","received_events_url":"https://api.github.com/users/jimtabor/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":730524222,"node_id":"MDU6TGFiZWw3MzA1MjQyMjI=","url":"https://api.github.com/repos/reactos/reactos/labels/WIP","name":"WIP","color":"4169E1","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/reactos/reactos/pulls/1178/commits","review_comments_url":"https://api.github.com/repos/reactos/reactos/pulls/1178/comments","review_comment_url":"https://api.github.com/repos/reactos/reactos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reactos/reactos/issues/1178/comments","statuses_url":"https://api.github.com/repos/reactos/reactos/statuses/ee3ff2e5765493c6e99a280c0b604c2113cb4baf","head":{"label":"katahiromz:impl-ghost","ref":"impl-ghost","sha":"ee3ff2e5765493c6e99a280c0b604c2113cb4baf","user":{"login":"katahiromz","id":2107452,"node_id":"MDQ6VXNlcjIxMDc0NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/2107452?v=4","gravatar_id":"","url":"https://api.github.com/users/katahiromz","html_url":"https://github.com/katahiromz","followers_url":"https://api.github.com/users/katahiromz/followers","following_url":"https://api.github.com/users/katahiromz/following{/other_user}","gists_url":"https://api.github.com/users/katahiromz/gists{/gist_id}","starred_url":"https://api.github.com/users/katahiromz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katahiromz/subscriptions","organizations_url":"https://api.github.com/users/katahiromz/orgs","repos_url":"https://api.github.com/users/katahiromz/repos","events_url":"https://api.github.com/users/katahiromz/events{/privacy}","received_events_url":"https://api.github.com/users/katahiromz/received_events","type":"User","site_admin":false},"repo":{"id":123541775,"node_id":"MDEwOlJlcG9zaXRvcnkxMjM1NDE3NzU=","name":"reactos","full_name":"katahiromz/reactos","private":false,"owner":{"login":"katahiromz","id":2107452,"node_id":"MDQ6VXNlcjIxMDc0NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/2107452?v=4","gravatar_id":"","url":"https://api.github.com/users/katahiromz","html_url":"https://github.com/katahiromz","followers_url":"https://api.github.com/users/katahiromz/followers","following_url":"https://api.github.com/users/katahiromz/following{/other_user}","gists_url":"https://api.github.com/users/katahiromz/gists{/gist_id}","starred_url":"https://api.github.com/users/katahiromz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katahiromz/subscriptions","organizations_url":"https://api.github.com/users/katahiromz/orgs","repos_url":"https://api.github.com/users/katahiromz/repos","events_url":"https://api.github.com/users/katahiromz/events{/privacy}","received_events_url":"https://api.github.com/users/katahiromz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/katahiromz/reactos","description":"A free Windows-compatible Operating System","fork":true,"url":"https://api.github.com/repos/katahiromz/reactos","forks_url":"https://api.github.com/repos/katahiromz/reactos/forks","keys_url":"https://api.github.com/repos/katahiromz/reactos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/katahiromz/reactos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/katahiromz/reactos/teams","hooks_url":"https://api.github.com/repos/katahiromz/reactos/hooks","issue_events_url":"https://api.github.com/repos/katahiromz/reactos/issues/events{/number}","events_url":"https://api.github.com/repos/katahiromz/reactos/events","assignees_url":"https://api.github.com/repos/katahiromz/reactos/assignees{/user}","branches_url":"https://api.github.com/repos/katahiromz/reactos/branches{/branch}","tags_url":"https://api.github.com/repos/katahiromz/reactos/tags","blobs_url":"https://api.github.com/repos/katahiromz/reactos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/katahiromz/reactos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/katahiromz/reactos/git/refs{/sha}","trees_url":"https://api.github.com/repos/katahiromz/reactos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/katahiromz/reactos/statuses/{sha}","languages_url":"https://api.github.com/repos/katahiromz/reactos/languages","stargazers_url":"https://api.github.com/repos/katahiromz/reactos/stargazers","contributors_url":"https://api.github.com/repos/katahiromz/reactos/contributors","subscribers_url":"https://api.github.com/repos/katahiromz/reactos/subscribers","subscription_url":"https://api.github.com/repos/katahiromz/reactos/subscription","commits_url":"https://api.github.com/repos/katahiromz/reactos/commits{/sha}","git_commits_url":"https://api.github.com/repos/katahiromz/reactos/git/commits{/sha}","comments_url":"https://api.github.com/repos/katahiromz/reactos/comments{/number}","issue_comment_url":"https://api.github.com/repos/katahiromz/reactos/issues/comments{/number}","contents_url":"https://api.github.com/repos/katahiromz/reactos/contents/{+path}","compare_url":"https://api.github.com/repos/katahiromz/reactos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/katahiromz/reactos/merges","archive_url":"https://api.github.com/repos/katahiromz/reactos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/katahiromz/reactos/downloads","issues_url":"https://api.github.com/repos/katahiromz/reactos/issues{/number}","pulls_url":"https://api.github.com/repos/katahiromz/reactos/pulls{/number}","milestones_url":"https://api.github.com/repos/katahiromz/reactos/milestones{/number}","notifications_url":"https://api.github.com/repos/katahiromz/reactos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/katahiromz/reactos/labels{/name}","releases_url":"https://api.github.com/repos/katahiromz/reactos/releases{/id}","deployments_url":"https://api.github.com/repos/katahiromz/reactos/deployments","created_at":"2018-03-02T06:48:58Z","updated_at":"2018-12-27T00:25:31Z","pushed_at":"2019-01-03T12:59:09Z","git_url":"git://github.com/katahiromz/reactos.git","ssh_url":"git@github.com:katahiromz/reactos.git","clone_url":"https://github.com/katahiromz/reactos.git","svn_url":"https://github.com/katahiromz/reactos","homepage":null,"size":466830,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"reactos:master","ref":"master","sha":"60f018aea6226390a09c6cfb327cb340b1c18169","user":{"login":"reactos","id":1056157,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNTYxNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1056157?v=4","gravatar_id":"","url":"https://api.github.com/users/reactos","html_url":"https://github.com/reactos","followers_url":"https://api.github.com/users/reactos/followers","following_url":"https://api.github.com/users/reactos/following{/other_user}","gists_url":"https://api.github.com/users/reactos/gists{/gist_id}","starred_url":"https://api.github.com/users/reactos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactos/subscriptions","organizations_url":"https://api.github.com/users/reactos/orgs","repos_url":"https://api.github.com/users/reactos/repos","events_url":"https://api.github.com/users/reactos/events{/privacy}","received_events_url":"https://api.github.com/users/reactos/received_events","type":"Organization","site_admin":false},"repo":{"id":105627846,"node_id":"MDEwOlJlcG9zaXRvcnkxMDU2Mjc4NDY=","name":"reactos","full_name":"reactos/reactos","private":false,"owner":{"login":"reactos","id":1056157,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNTYxNTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1056157?v=4","gravatar_id":"","url":"https://api.github.com/users/reactos","html_url":"https://github.com/reactos","followers_url":"https://api.github.com/users/reactos/followers","following_url":"https://api.github.com/users/reactos/following{/other_user}","gists_url":"https://api.github.com/users/reactos/gists{/gist_id}","starred_url":"https://api.github.com/users/reactos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactos/subscriptions","organizations_url":"https://api.github.com/users/reactos/orgs","repos_url":"https://api.github.com/users/reactos/repos","events_url":"https://api.github.com/users/reactos/events{/privacy}","received_events_url":"https://api.github.com/users/reactos/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/reactos/reactos","description":"A free Windows-compatible Operating System","fork":false,"url":"https://api.github.com/repos/reactos/reactos","forks_url":"https://api.github.com/repos/reactos/reactos/forks","keys_url":"https://api.github.com/repos/reactos/reactos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactos/reactos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactos/reactos/teams","hooks_url":"https://api.github.com/repos/reactos/reactos/hooks","issue_events_url":"https://api.github.com/repos/reactos/reactos/issues/events{/number}","events_url":"https://api.github.com/repos/reactos/reactos/events","assignees_url":"https://api.github.com/repos/reactos/reactos/assignees{/user}","branches_url":"https://api.github.com/repos/reactos/reactos/branches{/branch}","tags_url":"https://api.github.com/repos/reactos/reactos/tags","blobs_url":"https://api.github.com/repos/reactos/reactos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactos/reactos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactos/reactos/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactos/reactos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactos/reactos/statuses/{sha}","languages_url":"https://api.github.com/repos/reactos/reactos/languages","stargazers_url":"https://api.github.com/repos/reactos/reactos/stargazers","contributors_url":"https://api.github.com/repos/reactos/reactos/contributors","subscribers_url":"https://api.github.com/repos/reactos/reactos/subscribers","subscription_url":"https://api.github.com/repos/reactos/reactos/subscription","commits_url":"https://api.github.com/repos/reactos/reactos/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactos/reactos/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactos/reactos/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactos/reactos/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactos/reactos/contents/{+path}","compare_url":"https://api.github.com/repos/reactos/reactos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactos/reactos/merges","archive_url":"https://api.github.com/repos/reactos/reactos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactos/reactos/downloads","issues_url":"https://api.github.com/repos/reactos/reactos/issues{/number}","pulls_url":"https://api.github.com/repos/reactos/reactos/pulls{/number}","milestones_url":"https://api.github.com/repos/reactos/reactos/milestones{/number}","notifications_url":"https://api.github.com/repos/reactos/reactos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactos/reactos/labels{/name}","releases_url":"https://api.github.com/repos/reactos/reactos/releases{/id}","deployments_url":"https://api.github.com/repos/reactos/reactos/deployments","created_at":"2017-10-03T08:04:52Z","updated_at":"2019-01-03T21:28:16Z","pushed_at":"2019-01-03T21:28:40Z","git_url":"git://github.com/reactos/reactos.git","ssh_url":"git@github.com:reactos/reactos.git","clone_url":"https://github.com/reactos/reactos.git","svn_url":"https://github.com/reactos/reactos","homepage":null,"size":466441,"stargazers_count":5708,"watchers_count":5708,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":516,"mirror_url":null,"archived":false,"open_issues_count":89,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":516,"open_issues":89,"watchers":5708,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reactos/reactos/pulls/1178"},"html":{"href":"https://github.com/reactos/reactos/pull/1178"},"issue":{"href":"https://api.github.com/repos/reactos/reactos/issues/1178"},"comments":{"href":"https://api.github.com/repos/reactos/reactos/issues/1178/comments"},"review_comments":{"href":"https://api.github.com/repos/reactos/reactos/pulls/1178/comments"},"review_comment":{"href":"https://api.github.com/repos/reactos/reactos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reactos/reactos/pulls/1178/commits"},"statuses":{"href":"https://api.github.com/repos/reactos/reactos/statuses/ee3ff2e5765493c6e99a280c0b604c2113cb4baf"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ThFabba"}}