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

Building on wayfire 0.8 or git version fails #6

Closed
stefonarch opened this issue Dec 26, 2022 · 7 comments · Fixed by #7
Closed

Building on wayfire 0.8 or git version fails #6

stefonarch opened this issue Dec 26, 2022 · 7 comments · Fixed by #7

Comments

@stefonarch
Copy link
Contributor

As title.

.so.p/kbdd.cpp.o -c ../src/kbdd.cpp
../src/kbdd.cpp: In member function ‘virtual void kbdd_plugin::init()’:
../src/kbdd.cpp:91:48: error: cannot convert ‘wf::signal_callback_t*’ {aka ‘std::function<void(wf::signal_data_t*)>*’} to ‘wf::signal_connection_t*’
   91 |         output->connect_signal("view-focused", &on_focus_changed);
      |                                                ^~~~~~~~~~~~~~~~~
      |                                                |
      |                                                wf::signal_callback_t* {aka std::function<void(wf::signal_data_t*)>*}
In file included from /usr/include/wayfire/output.hpp:5,
                 from ../src/kbdd.cpp:4:
/usr/include/wayfire/object.hpp:76:64: note:   initializing argument 2 of ‘void wf::signal_provider_t::connect_signal(std::string, wf::signal_connection_t*)’
   76 |     void connect_signal(std::string name, signal_connection_t *callback);
      |                                           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
../src/kbdd.cpp:92:53: error: cannot convert ‘wf::signal_callback_t*’ {aka ‘std::function<void(wf::signal_data_t*)>*’} to ‘wf::signal_connection_t*’
   92 |         output->connect_signal("view-pre-unmapped", &on_view_unmapped);
      |                                                     ^~~~~~~~~~~~~~~~~
      |                                                     |
      |                                                     wf::signal_callback_t* {aka std::function<void(wf::signal_data_t*)>*}
/usr/include/wayfire/object.hpp:76:64: note:   initializing argument 2 of ‘void wf::signal_provider_t::connect_signal(std::string, wf::signal_connection_t*)’
   76 |     void connect_signal(std::string name, signal_connection_t *callback);
      |                                           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
../src/kbdd.cpp: In member function ‘virtual void kbdd_plugin::fini()’:
../src/kbdd.cpp:97:34: error: no matching function for call to ‘wf::output_t::disconnect_signal(const char [13], wf::signal_callback_t*)’
   97 |         output->disconnect_signal("view-focused", &on_focus_changed);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/wayfire/object.hpp:78:10: note: candidate: ‘void wf::signal_provider_t::disconnect_signal(wf::signal_connection_t*)’
   78 |     void disconnect_signal(signal_connection_t *callback);
      |          ^~~~~~~~~~~~~~~~~
/usr/include/wayfire/object.hpp:78:10: note:   candidate expects 1 argument, 2 provided
../src/kbdd.cpp:98:34: error: no matching function for call to ‘wf::output_t::disconnect_signal(const char [18], wf::signal_callback_t*)’
   98 |         output->disconnect_signal("view-pre-unmapped", &on_view_unmapped);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/wayfire/object.hpp:78:10: note: candidate: ‘void wf::signal_provider_t::disconnect_signal(wf::signal_connection_t*)’
   78 |     void disconnect_signal(signal_connection_t *callback);
      |          ^~~~~~~~~~~~~~~~~
/usr/include/wayfire/object.hpp:78:10: note:   candidate expects 1 argument, 2 provided
ninja: build stopped: subcommand failed.

@AlexJakeGreen
Copy link
Owner

AlexJakeGreen commented Dec 27, 2022

0.8 API is not stabilized WayfireWM/wayfire#1317
If we make it working for mainline – it will stop working for releases.
If we leave it working for release – it will not work for mainline.
Unfortunately.

@AlexJakeGreen
Copy link
Owner

I have made branch api0.8 for the new API.
But there's a small issue, "view-focused" is not triggered after "view-pre-unmapped":
1 open foot terminal window 1
2 open foot terminal window 2
3 active window 2, switch layout, press Ctrl-D
4 do not click with mouse, just write something

Observed:
layout did not change back
signal "view-focused" not fired
If clicked on window then "view-focused" is fired and the layout is set properly.

Need to clarify if "view-focused" is expected to be present for existing window after "view-pre-unmapped"

@AlexJakeGreen
Copy link
Owner

Asked for more info WayfireWM/wayfire#1680

@stefonarch
Copy link
Contributor Author

Appreciate much, thanks a lot, it works ok atm with the 0.8 branch.
It seems not a big thing but for me the per-application-layout has always been one of the real useful settings.

@AlexJakeGreen
Copy link
Owner

Hi @stefonarch

I have updated the api0.8 branch with new recommendations from Wayfire developers.

It works on my side, but before I merge I want to be sure it works on your side too. Could you please rebuild and check?
Thanks!

@stefonarch
Copy link
Contributor Author

I've not installed foot and didn't understand what ctrl+D does in your installation (could you explain?), so I couldn't test this, but with the previous commit I could see the following:

  1. open some text app
  2. open another, switch layout
  3. change to the first app and close it
  4. layout at the second app is switched back

This is fixed now.

AlexJakeGreen added a commit that referenced this issue Jan 10, 2023
* Update for API 0.8

* Switch using the "keyboard-focus-changed" signal. Store layout_id in view
@stefonarch
Copy link
Contributor Author

I'm afraid we're here again, against latest git:

FAILED: src/libkbdd.so.p/kbdd.cpp.o 
ccache c++ -Isrc/libkbdd.so.p -Isrc -I../src -I/usr/include/cairo -I/usr/include/lzo -I/usrnclude/libpng16 -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -Isr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/pixman-1 -I/usr/include/pan-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/libm -I/usr/include/libevdev-1.0 -I/usr/include/libxml2 -fdiagnostics-color=always -D_FILE_OFFT_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++17 -O0 -g -DWLR_USE_UNSTABLE -DWAYFIRE_PLUGINfPIC -pthread -MD -MQ src/libkbdd.so.p/kbdd.cpp.o -MF src/libkbdd.so.p/kbdd.cpp.o.d -o src/bkbdd.so.p/kbdd.cpp.o -c ../src/kbdd.cpp
../src/kbdd.cpp:63:9: error: ‘signal_connection_t’ in namespace ‘wf’ does not name a type
   63 |     wf::signal_connection_t keyboard_focus_changed = [=] (wf::signal_data_t *data) 
      |         ^~~~~~~~~~~~~~~~~~~
../src/kbdd.cpp: In member function ‘virtual void kbdd_plugin::init()’:
../src/kbdd.cpp:88:24: error: ‘class wf::compositor_core_t’ has no member named ‘connect_sial’
   88 |         wf::get_core().connect_signal("keyboard-focus-changed", &keyboard_focus_chaed);
      |                        ^~~~~~~~~~~~~~
../src/kbdd.cpp:88:66: error: ‘keyboard_focus_changed’ was not declared in this scope
   88 |         wf::get_core().connect_signal("keyboard-focus-changed", &keyboard_focus_chaed);
      |                                                                  ^~~~~~~~~~~~~~~~~~~~
../src/kbdd.cpp: In member function ‘virtual void kbdd_plugin::fini()’:
../src/kbdd.cpp:92:24: error: ‘class wf::compositor_core_t’ has no member named ‘disconnectignal’
   92 |         wf::get_core().disconnect_signal(&keyboard_focus_changed);
      |                        ^~~~~~~~~~~~~~~~~
../src/kbdd.cpp:92:43: error: ‘keyboard_focus_changed’ was not declared in this scope
   92 |         wf::get_core().disconnect_signal(&keyboard_focus_changed);

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 a pull request may close this issue.

2 participants