{"action":"created","issue":{"url":"https://api.github.com/repos/company-mode/company-mode/issues/471","repository_url":"https://api.github.com/repos/company-mode/company-mode","labels_url":"https://api.github.com/repos/company-mode/company-mode/issues/471/labels{/name}","comments_url":"https://api.github.com/repos/company-mode/company-mode/issues/471/comments","events_url":"https://api.github.com/repos/company-mode/company-mode/issues/471/events","html_url":"https://github.com/company-mode/company-mode/issues/471","id":133117296,"number":471,"title":"Steps towards a real tooptip implementation","user":{"login":"cpitclaudel","id":8181630,"avatar_url":"https://avatars.githubusercontent.com/u/8181630?v=3","gravatar_id":"","url":"https://api.github.com/users/cpitclaudel","html_url":"https://github.com/cpitclaudel","followers_url":"https://api.github.com/users/cpitclaudel/followers","following_url":"https://api.github.com/users/cpitclaudel/following{/other_user}","gists_url":"https://api.github.com/users/cpitclaudel/gists{/gist_id}","starred_url":"https://api.github.com/users/cpitclaudel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpitclaudel/subscriptions","organizations_url":"https://api.github.com/users/cpitclaudel/orgs","repos_url":"https://api.github.com/users/cpitclaudel/repos","events_url":"https://api.github.com/users/cpitclaudel/events{/privacy}","received_events_url":"https://api.github.com/users/cpitclaudel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/company-mode/company-mode/labels/wishlist","name":"wishlist","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2016-02-11T23:35:09Z","updated_at":"2016-02-16T04:22:39Z","closed_at":null,"body":"Hi Dmitry,\r\n\r\nWe've discussed using a real popup instead of overlays a number of times, so I thought I'd investigate a bit. It seems that it should be possible to use `x-pos-tip` on graphical terminals (I think you mentioned that on another thread, too). Here's what it would look like:\r\n\r\n```\r\n(setq x-gtk-use-system-tooltips nil)\r\n\r\n(defvar my/lines\r\n  '(#(\" combine-after-change-calls        \" 0 1 (face (company-tooltip-selection company-tooltip) mouse-face (company-tooltip-mouse)) 1 4 (face (company-tooltip-common-selection company-tooltip-selection company-tooltip) mouse-face (company-tooltip-mouse)) 4 34 (face (company-tooltip-selection company-tooltip) mouse-face (company-tooltip-mouse)) 34 35 (face company-scrollbar-fg))\r\n    #(\" combine-after-change-execute      \" 0 1 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 1 4 (face (company-tooltip-common company-tooltip) mouse-face (company-tooltip-mouse)) 4 34 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 34 35 (face company-scrollbar-bg))\r\n    #(\" combine-and-quote-strings         \" 0 1 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 1 4 (face (company-tooltip-common company-tooltip) mouse-face (company-tooltip-mouse)) 4 34 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 34 35 (face company-scrollbar-bg))\r\n    #(\" comint--complete-file-name-data   \" 0 1 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 1 4 (face (company-tooltip-common company-tooltip) mouse-face (company-tooltip-mouse)) 4 34 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 34 35 (face company-scrollbar-bg))\r\n    #(\" comint--match-partial-filename    \" 0 1 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 1 4 (face (company-tooltip-common company-tooltip) mouse-face (company-tooltip-mouse)) 4 34 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 34 35 (face company-scrollbar-bg))\r\n    #(\" comint--requote-argument          \" 0 1 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 1 4 (face (company-tooltip-common company-tooltip) mouse-face (company-tooltip-mouse)) 4 34 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 34 35 (face company-scrollbar-bg))\r\n    #(\" comint--unquote&expand-filename   \" 0 1 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 1 4 (face (company-tooltip-common company-tooltip) mouse-face (company-tooltip-mouse)) 4 34 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 34 35 (face company-scrollbar-bg))\r\n    #(\" comint--unquote&requote-argument  \" 0 1 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 1 4 (face (company-tooltip-common company-tooltip) mouse-face (company-tooltip-mouse)) 4 34 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 34 35 (face company-scrollbar-bg))\r\n    #(\" comint--unquote-argument          \" 0 1 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 1 4 (face (company-tooltip-common company-tooltip) mouse-face (company-tooltip-mouse)) 4 34 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 34 35 (face company-scrollbar-bg))\r\n    #(\" comint-accumulate                 \" 0 1 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 1 4 (face (company-tooltip-common company-tooltip) mouse-face (company-tooltip-mouse)) 4 34 (face (company-tooltip) mouse-face (company-tooltip-mouse)) 34 35 (face company-scrollbar-bg))))\r\n\r\n(x-show-tip (mapconcat (lambda (l) (concat l \"​\")) my/lines \"\\n\") nil\r\n            `((internal-border-width . 0)\r\n              (border-width . 0)\r\n              (background-color . ,(face-attribute 'company-tooltip :background))))\r\n```\r\n\r\nIt looks pretty good, I think :)\r\n\r\nIs this a direction that we want to explore? If so, is there a way for us to implement this little by little? I don't have much time at all, but I'd be very happy to see this happen.\r\n\r\nCheers,\r\nClément.\r\n"},"comment":{"url":"https://api.github.com/repos/company-mode/company-mode/issues/comments/184510666","html_url":"https://github.com/company-mode/company-mode/issues/471#issuecomment-184510666","issue_url":"https://api.github.com/repos/company-mode/company-mode/issues/471","id":184510666,"user":{"login":"cpitclaudel","id":8181630,"avatar_url":"https://avatars.githubusercontent.com/u/8181630?v=3","gravatar_id":"","url":"https://api.github.com/users/cpitclaudel","html_url":"https://github.com/cpitclaudel","followers_url":"https://api.github.com/users/cpitclaudel/followers","following_url":"https://api.github.com/users/cpitclaudel/following{/other_user}","gists_url":"https://api.github.com/users/cpitclaudel/gists{/gist_id}","starred_url":"https://api.github.com/users/cpitclaudel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpitclaudel/subscriptions","organizations_url":"https://api.github.com/users/cpitclaudel/orgs","repos_url":"https://api.github.com/users/cpitclaudel/repos","events_url":"https://api.github.com/users/cpitclaudel/events{/privacy}","received_events_url":"https://api.github.com/users/cpitclaudel/received_events","type":"User","site_admin":false},"created_at":"2016-02-16T04:22:39Z","updated_at":"2016-02-16T04:22:39Z","body":"> It looks pretty broken here: the frame has chrome, it's displayed in the top-left corner of the desktop, with dimensions that are too large, it takes focus, and it does not get updated even if I switch back to the original frame, and change selection in the popup.\r\n\r\nDid you restart Emacs after installing xcb? And are you on 25?\r\n\r\n> The original frame still shows the overlay-based popup, is that intended?\r\n\r\nSure; just replacing `pseudo-tooltip-{show,hide}` was causing all sorts of failures, so I just added the advice instead of replacing. We can fix this once we have something that starts being remotely usable :)\r\n\r\n> And it leaves network connections open, which becomes apparent when I try to close Emacs.\r\n\r\nI didn't test for that, but it could be xcb not installing properly."}}