Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Can't the posframe have rounded corner? #125

Open
SATYADAHAL opened this issue Mar 3, 2023 · 9 comments
Open

Feature Request: Can't the posframe have rounded corner? #125

SATYADAHAL opened this issue Mar 3, 2023 · 9 comments

Comments

@SATYADAHAL
Copy link

I was wandering if it is possible to remove pointed corner and add something like rouneded corner?

@tumashu
Copy link
Owner

tumashu commented Mar 4, 2023

i do not know :)

@SATYADAHAL
Copy link
Author

SATYADAHAL commented Mar 4, 2023

I don't know much about Emacs lisp. But I assume you created a frame using make-frame. And the make-frame adapts the shape given by the window manager.
So getting rounded corner on OS where WM provides rectangular shape is not possible.
But my Window Manager(WM) provides rounded corner.
I just created a rounded corner using make-frame , the code and screenshot of frame is below.
Can it be somehow made compatible for Window Managers that support rounded corner?

(make-frame 
'((fullscreen . nil)
 (parent-frame . (selected-frame))
 (width . 80) (height . 20)
 (title . "posframe")
 (keep-ratio ,keep-ratio)
 (min-width  . 0)
 (min-height . 0)
 (border-width . 0)
 (menu-bar-lines . 0)
 (tool-bar-lines . 0)
 (tab-bar-lines . 0)
 (line-spacing . 0)
 (unsplittable . t)
 (no-other-frame . t)
(undecorated . t)
 (minibuffer . nil)
 (no-special-glyphs . t)
 (skip-taskbar . t)
 (desktop-dont-save . t)
 (left-fringe . 0)
 (right-fringe . 0)))

Screenshot_20230304_091415

@tumashu
Copy link
Owner

tumashu commented Mar 6, 2023

@SATYADAHAL which frame para control rounded corner?

@SATYADAHAL
Copy link
Author

SATYADAHAL commented Mar 6, 2023

@tumashu I am not sure which one does. But default (make-frame) without any parameters gives me rounded corner.
All the parameters that I mentioned above didn't seem to change the roundness. If you can provide all the params you have used i can test them out. I don't have good knowledge on lisp to extract all params from your code.

@tumashu
Copy link
Owner

tumashu commented Mar 6, 2023

(setq-local posframe--frame

@woolsweater
Copy link

woolsweater commented Jul 16, 2023

Although you have passed (parent-frame . (selected-frame)) in the parameters, you've quoted the entire set of parameters without unquoting (selected-frame). This means that you have not created a child frame, but a regular frame (since the parent-frame value is not a valid frame). Notice that if you drag the original frame, the new frame does not move along with it.

With the corrected quoting below, do you still get rounded corners?

(make-frame 
 `((fullscreen . nil)
   (parent-frame . ,(selected-frame))
   (width . 80) (height . 20)
   (title . "posframe")
   (keep-ratio . t)
   (min-width  . 0)
   (min-height . 0)
   (border-width . 0)
   (menu-bar-lines . 0)
   (tool-bar-lines . 0)
   (tab-bar-lines . 0)
   (line-spacing . 0)
   (unsplittable . t)
   (no-other-frame . t)
   (undecorated . t)
   (minibuffer . nil)
   (no-special-glyphs . t)
   (skip-taskbar . t)
   (desktop-dont-save . t)
   (left-fringe . 0)
   (right-fringe . 0)))

If so, what Mac OS version are you running?

@SATYADAHAL
Copy link
Author

Rounded corner is given by some DesktopEnvironment to its window's. But since DE doesnot consider child frame as a window its not possible to give child frame a rounded corner. Only option is to make this possible to make frame independent i.e creating a new window. But doing so would not be wise in case of posframe.
And with your code I didn't get the rounded corner since its just a child frame.
I am not on Mac. I am on fedora KDE spin.

@woolsweater
Copy link

Oh, sorry, I mistook those icons at the bottom of the screenshot for Mac icons. It looks like they were designed to be very similiar 🙂

@JoshTRN
Copy link

JoshTRN commented Jan 22, 2024

@SATYADAHAL I was able to achieve this on mac os using emacs-plus29 by modifying the following line in posframe.el from:

(undecorated . t)

to:

(undecorated-rounded . t)

(undecorated . t)

Note that this is a very mac-specific solve. I was not able to do it on my linux machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants