{"id":65,"date":"2006-12-20T11:00:00","date_gmt":"2006-12-20T09:00:00","guid":{"rendered":"http:\/\/www.thelins.se\/johan\/blog\/2006\/12\/acer-annoyance-fix\/"},"modified":"2006-12-20T11:00:00","modified_gmt":"2006-12-20T09:00:00","slug":"acer-annoyance-fix","status":"publish","type":"post","link":"https:\/\/www.thelins.se\/johan\/blog\/2006\/12\/acer-annoyance-fix\/","title":{"rendered":">Acer Annoyance Fix"},"content":{"rendered":"<p>>One of the things that have annoyed me since I started working with an Acer laptop was that when working in Windows the GraviSense application appeared in the Alt-Tab list even if it had no window to show. To save that extra Tab key press I asked Raymond Chen for a tip on how to make it go away. The solution was to set the <span style=\"font-size:85%;\"><span style=\"font-family:courier new;\">WS_EX_TOOLWINDOW<\/span><\/span> extended style bit. Taking this and the good old <a href=\"http:\/\/www.cs.virginia.edu\/%7Elcc-win32\/\">LCC-Win32<\/a> compiler I put together the following little snippet and the window disappears from the Alt-Tab list but stays alert (I shook the laptop gentry to trigger it).<\/p>\n<p><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\">#include &lt;windows.h&gt; <windows.h><\/windows.h><\/span><\/p>\n<p><span style=\"font-family:courier new;\">int APIENTRY WinMain(HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpCmdLine, int nCmdShow)<\/span><br \/><span style=\"font-family:courier new;\">{<\/span><br \/><span style=\"font-family:courier new;\">  HWND acerWin = <span style=\"font-weight: bold;\">FindWindow<\/span>( NULL, &#8220;ACER_GraviSense&#8221; );<\/span><\/p>\n<p><\/span><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\">  <\/span><\/span><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\">    if( !acerWin )<\/span><br \/><\/span><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\">  <\/span><\/span><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\">  <\/span><\/span><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\">        return -1;<\/span><\/p>\n<p><span style=\"font-family:courier new;\">    <\/span><\/span><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\">  <\/span><\/span><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\"><span style=\"font-weight: bold;\">SetWindowLong<\/span>( acerWin, GWL_EXSTYLE, <span style=\"font-weight: bold;\">GetWindowLong<\/span>( acerWin, GWL_EXSTYLE ) | WS_EX_TOOLWINDOW );<\/span><\/p>\n<p><\/span><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\">  <\/span><\/span><span style=\"font-size:85%;\"><span style=\"font-family:courier new;\">    return 0;<\/span><br \/><span style=\"font-family:courier new;\">}<\/span><\/span><\/p>\n<p>And they say that Linux is for those who wants to hack the system&#8230; :-)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>>One of the things that have annoyed me since I started working with an Acer laptop was that when working in Windows the GraviSense application appeared in the Alt-Tab list even if it had no window to show. To save that extra Tab key press I asked Raymond Chen for a tip on how to &hellip; <a href=\"https:\/\/www.thelins.se\/johan\/blog\/2006\/12\/acer-annoyance-fix\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">>Acer Annoyance Fix<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-65","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":0,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.thelins.se\/johan\/blog\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}