cairoshell icon indicating copy to clipboard operation
cairoshell copied to clipboard

Is it possible "global menu" for Cairo?

Open mealpi opened this issue 3 years ago • 3 comments

Hi, Is it possible to make a "global menu" for cairo If such a thing is possible, it will be very useful for cairo. Please add this feature, tanks...

mealpi avatar Jan 05 '23 16:01 mealpi

What do you mean by a "Global Menu"? I don't really understand what you wanted to require.

You could add an image made in paint or any other program to better illustrate your idea.

gMagnus87 avatar Jan 16 '23 02:01 gMagnus87

Like KDE global menu or Gnome Fildem global menu extension or osx panel. RfNC7NOtZnNLcPt4Z4nJdCrdLDyynFL_yVeKlwcFBxY images_1673948237563

mealpi avatar Jan 17 '23 09:01 mealpi

The request is to get the current window's menu bar component and mirror it on the top of Cairoshell's top panel. I like the idea, but it is difficult:

  1. It requires getting the handles of the original menu bar, get its children, and copy each feature.

  2. It requires removing the menu bar component from the original window, which will prevent the application to directly access it.

2a. To fix this, instead of removing the component from the window, we would need to hide it, hook each menu's entry for incoming messages and handle every message received.

  1. What about switching to another application? We would need to release the former windows' hooks, scan the next window and handle each new hooks.

3a. We could cache the menu bars by using a map (hwnd as the key, a managed menu bar object as the value) but memory management would be a pain, since it would be more than double of the amount of memory that is used to manage menus)

Blastd avatar Feb 05 '23 11:02 Blastd