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

Open panel at cursor position #22

Open
SUPERCILEX opened this issue Feb 21, 2022 · 11 comments
Open

Open panel at cursor position #22

SUPERCILEX opened this issue Feb 21, 2022 · 11 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@SUPERCILEX
Copy link
Owner

From Tudmotu/gnome-shell-extension-clipboard-indicator#110

@SUPERCILEX SUPERCILEX added the enhancement New feature or request label Feb 21, 2022
@SUPERCILEX SUPERCILEX added this to the Backlog milestone Feb 23, 2022
@SUPERCILEX
Copy link
Owner Author

Found a way to do this for the mouse pointer, but not the cursor:

const actor = this.menu.actor;
let [x, y] = global.get_pointer();

if (x + actor.width > global.stage.width) {
  x -= actor.width;
}
if (y + actor.height > global.stage.height) {
  y -= actor.height;
}

actor.set_position(x, y);

@rohmishra
Copy link

@SUPERCILEX I wonder if the accessibility features could be useful place to check but the IME OSK does recognize if the text input would be covered by the popup I guess by checking against height?

@rohmishra
Copy link

rohmishra commented Mar 7, 2022

It checks the size of the whole window not the text space. Sorry; my bad. https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/keyboard.js#L634

Ideally the menu being next to text input area would be ideal but cursor would be the next best thing as you can quickly select the desired option.

@SUPERCILEX
Copy link
Owner Author

I tried the mouse thing and ended up not liking it because the mouse wasn't in a predictable place. I'd be willing to add it behind an option, but I haven't figured out how to make set_position work reliably (right now it only works if the top bar is hidden).

@SUPERCILEX SUPERCILEX removed this from the Backlog milestone Mar 7, 2022
@SUPERCILEX SUPERCILEX added the help wanted Extra attention is needed label Mar 7, 2022
@LubosRemplik
Copy link

👍

@orta
Copy link

orta commented Mar 22, 2022

My previous clipboard manager would show the window in the center of the screen, which is also a pretty reasonable answer to making it trivial to find

@LubosRemplik
Copy link

LubosRemplik commented Mar 22, 2022

My previous clipboard manager would show the window in the center of the screen, which is also a pretty reasonable answer to making it trivial to find

Exactly. with 5120 x 1440 screen i am using, set option to center position would be perfect

Tried to adjust things and compile myself, but no luck yet :)

@ruby232
Copy link

ruby232 commented Sep 30, 2023

Was this feature implemented? I couldn't find it in the code, so I created my fork, and it seems to be working fine. Would you like me to create a merge request for this?

@SUPERCILEX
Copy link
Owner Author

Sure, I'd love to take a look (no guarantees I'll merge though).

@ruby232
Copy link

ruby232 commented Oct 1, 2023

It only works when Guake is open, that's very strange but it doesn't throw any errors or warnings.

@TimFaro
Copy link

TimFaro commented Feb 19, 2024

Any chance that this could be added? I'd be happy to have the window open in the center of the screen or be movable so it can be placed somewhere more convenient, I have two monitors and it's a bit tedious right now, otherwise it's the best clipboard manager imo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants