[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Could x-show-tip be reimplemented in Elisp? How does one create bord
From: |
Clément Pit--Claudel |
Subject: |
Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp? |
Date: |
Fri, 12 Feb 2016 22:35:43 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 |
On 02/12/2016 09:15 PM, Chris Feng wrote:
> I think the relevant part in 'x_create_tip_frame' is actually:
>
> attrs.override_redirect = True;
>
> What you want to do is to remove the decoration added by the window
> manager. So you need to set the override-redirect flag on that X
> window.
You're right; thanks! I was navigating the C sources and reached that
conclusion as your email came :)
It doesn't seem that there's any Elisp level facility to customize this flag,
unfortunately. This means in particular that unless we patch the C sources,
there won't be a cross platform solution to this issue, right?
I've started thinking at what a patch would look like; presumably the idea
would be to expose the functionality of x_create_tip_frame to Elisp, moving
parts of x_show_tip into that function. I could try coming up with a patch, if
this is deemed useful.
There's one thing that confuses me, however: some code related to tooltips
seems to be duplicated between xfns.c, w32fns.c, etc; are these files
auto-generated? Or should I prepare a patch that adjusts all copies of that
code?
>> Is there a way to create a borderless frame from Elisp?
>
> You may have a look at XELB (available on ELPA). The following code
> should create a frame without decoration.
>
> (require 'xcb)
>
> (setq frame (make-frame '((visibility . nil))))
>
> (let ((window (string-to-number (frame-parameter frame 'outer-window-id)))
> (connection (xcb:connect-to-socket)))
> (xcb:+request connection
> (make-instance 'xcb:ChangeWindowAttributes
> :window window
> :value-mask xcb:CW:OverrideRedirect
> :override-redirect 1))
> (xcb:flush connection)
> (xcb:disconnect connection))
>
> (make-frame-visible frame)
This is really neat, actually :) Thanks a lot! It works great on my machine.
I'd still like to find a cross-platform solution, though; company isn't
X-specific. Am I right to think that this will only work on GNU/Linux?
Clément.
signature.asc
Description: OpenPGP digital signature
- Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?, Clément Pit--Claudel, 2016/02/12
- Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?, Chris Feng, 2016/02/12
- Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?,
Clément Pit--Claudel <=
- Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?, Chris Feng, 2016/02/12
- Creating a "borderless" frame (without WM chrome) (was Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?), Clément Pit--Claudel, 2016/02/16
- Re: Creating a "borderless" frame (without WM chrome) (was Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?), Chris Feng, 2016/02/16
- Re: Creating a "borderless" frame (without WM chrome) (was Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?), Clément Pit--Claudel, 2016/02/16
- Re: Creating a "borderless" frame (without WM chrome) (was Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?), Chris Feng, 2016/02/16
- Re: Creating a "borderless" frame (without WM chrome) (was Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?), Clément Pit--Claudel, 2016/02/16
- Re: Creating a "borderless" frame (without WM chrome) (was Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?), martin rudalics, 2016/02/17
- Re: Creating a "borderless" frame (without WM chrome) (was Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?), Chris Feng, 2016/02/17
- Re: Creating a "borderless" frame (without WM chrome) (was Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?), Clément Pit--Claudel, 2016/02/17
- Re: Creating a "borderless" frame (without WM chrome) (was Re: Could x-show-tip be reimplemented in Elisp? How does one create borderless frames from Elisp?), Chris Feng, 2016/02/17