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

Update to new API from mate-menus 1.21 #103

Closed
wants to merge 13 commits into from

Conversation

vkareh
Copy link
Contributor

@vkareh vkareh commented Jun 6, 2018

This may be considered work in progress. The mate-menus project has been updated and has breaking API changes. This pull request updates Brisk to support the new API, but until all necessary dependencies have been tagged appropriately (and 1.21 is a dev version), it might not make sense to merge this.

I will update this as necessary.

Fixes #115

This fixes an issue when Brisk swallows ButtonPress events when window manager is set to Super as its modifier key for moving and resizing windows.

Fixes solus-project#96
@vkareh
Copy link
Contributor Author

vkareh commented Jun 6, 2018

@raveit65, @monsta, @flexiondotorg, @yetist - please test at your convenience. This update won't really be necessary until we hit 1.22 (unless @ikeydoherty wants to track this against MATE 1.21 dev version)

This addresses an issue that occurs when trying to close the menu using the configured shortcut without modifiers, but Lock keys (NumLock, etc) are enabled.

Fixes solus-project#70
@monsta
Copy link

monsta commented Jun 10, 2018

Well, I don't use this menu, so I probably won't be able to test for regressions...

@vkareh vkareh changed the title [WIP] Update to new API from mate-menus 1.21 Update to new API from mate-menus 1.21 Oct 24, 2018
@yetist
Copy link

yetist commented Jan 1, 2019

Looks like it's not finished? If install/uninstall the software, brisk-menu applet will crash.
When the matemenutree changed, should run matemenu_tree_load_sync again.

This fixes an issue when Brisk swallows ButtonPress events when window manager is set to Super as its modifier key for moving and resizing windows.

Fixes solus-project#96
This addresses an issue that occurs when trying to close the menu using the configured shortcut without modifiers, but Lock keys (NumLock, etc) are enabled.

Fixes solus-project#70
@vkareh
Copy link
Contributor Author

vkareh commented Mar 7, 2019

@yetist - When the "changed" signal is triggered:

  • it calls brisk_apps_backend_changed,
  • which calls brisk_apps_backend_reload,
  • which calls brisk_apps_backend_init_menus,
  • which calls brisk_apps_backend_build_from_tree,
  • which finally calls matemenu_tree_load_sync.

Some of those are deferred because of the monitor callbacks, so maybe I need to explicitly call it earlier?

Or am I looking at the wrong thing? Sorry, it's been a while since I touch this code and I honestly don't remember a lot of what I did here 😕

@yetist
Copy link

yetist commented Mar 8, 2019

In my tests, it working in most cases, the install/uninstall software works.
But there may be some bugs in the code.

I wrote the following script:

$ cat test.sh 
#!/bin/bash
sudo mv /usr/share/applications/0ad.desktop ~/
update-desktop-database
sleep 5
sudo cp ~/0ad.desktop /usr/share/applications/0ad.desktop
update-desktop-database
sleep 5

And use watch -n 5 ./test.sh to run, keep the menu open while the script is running, click on some menu categories, and then brisk-menu crash.

@vkareh
Copy link
Contributor Author

vkareh commented Mar 8, 2019

@yetist - yeah, I can reproduce this consistently.

The issue seems to happen when adding the item to the GTK container in src/frontend/classic/classic-window.c, line 203:

gtk_container_add(GTK_CONTAINER(BRISK_CLASSIC_WINDOW(self)->apps), button);

It also happens with the dash-window.c. That's currently where I'm stuck - it seems like the BriskItem app_item that gets generated in brisk_apps_backend_recurse_root is somehow different during changes in the menu tree, which causes a segfault when trying to add it to the front-end...

@vkareh
Copy link
Contributor Author

vkareh commented Mar 8, 2019

damn, did I just really do that? sigh... I'll close this and open a new pull request under https://github.com/getsolus/brisk-menu

@vkareh vkareh closed this Mar 8, 2019
@vkareh
Copy link
Contributor Author

vkareh commented Mar 8, 2019

I've moved this to getsolus/brisk-menu#2

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

Successfully merging this pull request may close these issues.

5 participants