My application is written using pure X11 APIs only, i.e. no GTK, qt or any other middleware. Everything is done via the low-level Xlib API, e.g. XCreateWindow() and so on. Is it possible to add items to Unity's global menu bar from a pure X11 application or would this force me to do all window and event loop handling using a toolkit like GTK? I'd really like to stick with my current pure X11-based implementation but it would be nice if it was somehow possible to add a few menu items to Unity's global menu bar for my application.
Adding items to Unity's global menu bar for a pure X11 application
790 Views Asked by Andreas At
1
There are 1 best solutions below
Related Questions in C
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in LINUX
- Is there some way to use printf to print a horizontal list of decrementing hex digits in NASM assembly on Linux
- Why does Hugo generate different taxonomy-related HTML on different OS's?
- Writes in io_uring do not advance the file offset
- Why `set -o pipefail` gives different output even though the pipe is not failing
- what really controls the permissions: UID or eUID?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Docker container unable to make HTTPS requests to external API
- Whow to use callback_query_handler in Python 3.10
- Create kea runtime directory at startup in Yocto image
- Problem on CPU scheduling algorithms in OS
- How to copy files into the singularity sandbox?
- Android kernel error: undefined reference to `get_hw_version_platform'
- Is there a need for BPF Linux namespace?
- Error when trying to execute a binary compiled in a Kali Linux machine on an Ubuntu system
- Issue with launching application after updating ElectronJs to version 28.0.0 on Windows and Linux
Related Questions in GTK
- Do GTK file chooser dialogs come with localized strings for buttons and titles?
- Why does GTK beep when calling `gtk_entry_set_text` (while resizing a window)?
- Distributing a GTK4 Windows application
- Callback function doesn't modify widget
- getting arguments with g_signal_connect GTK4
- ValueError: Namespace Xdp not available
- How do I link gtk/gtk.h to my compiler in VSCode
- Using GTK v0.18.1 on rust to draw
- How to set transparent background for gtk_plug_new window
- GTK Cairo. Why gtk_widget_queue_draw called from function (in iddle callback) does not work?
- GTK4 Window Created from XML, Closes Immediately After Run()
- How do I receive UDP broadcast packets using GTK / GIO?
- Install Gtk 3.0 problem with depencies in linux
- Ubuntu 22.04 libgtk-3.so: undefined reference to symbol 'gdk_window_hide'
- GTK: "Object with ID not found" error, but the ID is empty
Related Questions in X11
- How can I set an uncommon screen resolution on GNU/Linux with an Arc 380 GPU and X11?
- Create screenshot and encode it in base64
- Rasppberry pi Remote Desktop Conection Problem
- GithubActions - PlatformError: X11: The DISPLAY environment variable is missing
- Unable to run X11 applications remotely via XQuartz on a mac
- WSL2 OpenAI Gym - render segmentation fault
- Converting BufferedImage to Pixmap
- Is there a lightweight GUI protocol like X11 that works well over ssh?
- dropdown is closing quickly without any action when tried to open it. it is a motif Xt library based application
- XCreateWindow - parent argument implications
- Drawing image to root window in Xorg using Xcb causes it to cover other windows
- How to open a GUI-Application on a Server (Raspi) via SSH using python/paramiko?
- Switch layouts and get char without X11 by driver?
- Xrandr making DisplayWidth() return incorrect value?
- Xlib Window Manager: Closing Focused Window Causes Unexpected Shutdown
Related Questions in UBUNTU-UNITY
- Gnome software can't uninstall any software: no packages to remove
- Unity C# Error: 'Sprite' does not contain a constructor that takes 0 arguments
- Force QFileDialog::DontUseNativeDialog globally in a QT program
- Always fullscreen on second monitor using OpenGL on Ubuntu 14.04
- Ubuntu unity cannot work, reinstall didn't fix
- Android emulator window stays on top after Alt+Tab
- Application viewer setfullscreen function not hiding ubuntu sidebar
- numix theme not working on ubuntu 15.10
- How to create a task bar icon with wxPHP in Ubuntu/Unity?
- How to create gtk menu item with shortcut displayed?
- Ubuntu 15.04. Error pops up
- How do I use the default ubuntu unity 14.04 login screen after installing xfce alongside?
- Is it possible to control window shadows individually?
- Getting Ubuntu 14.10 Unity Launcher to launch Android-Studio
- using FreeRDP disk redirection
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
To display menu each time some toplevel window is focused you need to call
com.canonical.AppMenu.Registrar.RegisterWindowmethod of/com/canonical/AppMenu/Registrarpassing window id and your menu path ( your string id, which is also a service name - usually build using some path and win id ). Then you need to implementcom.canonical.dbusmenuinterface on that service name - namely,GetLayout,GetGroupProperties,Event,AboutToShowandLayoutUpdatedmethods.I did simple library to implement all this in JavaScript using node-dbus and node-x11 libraries. See example which creates toplevel window and unity menu for it ( no glib / libdbus / libx11 dependencies here, pure networking )