Skip to content
Snippets Groups Projects

Add minimal app switcher protocol

Merged Guido Gunther requested to merge f/phosh-private into librem5
All threads resolved!

This adds a simple private protocoll to list and raise toplevels by app_id and title. We wanted a minimal set of objects, requests and events. Since this is only meant for the app overview page in the shell we can take many shortcuts and leave out e.g. XWayland for the moment.

We will switch to wlr_foreign_toplevel_unstable_v1 once that is merged.

The first commit just renames stuff the second adds the functionality.

To test you need phosh's app-switcher branch. The apps will be shown in the overview (when hitting the home button).

Edited by Guido Gunther

Merge request reports

Merged by Dorota CzaplejewiczDorota Czaplejewicz 6 years ago (Aug 30, 2018 2:40pm UTC)

Loading

Pipeline #842 passed

Pipeline passed for b6a9169a on librem5

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Guido Gunther added 2 commits

    added 2 commits

    • b188071e - phosh-private: Use output instead of display
    • ded4fa5b - Add phosh_private_xdg_switcher protocol

    Compare with previous version

  • There's a crash in rootston on switching windows when the master branch of phosh is used 29bcf5837d186ecaab923d94d23e37831e73ca3b

    Backtrace:

    >~"#0  0x00000000004115da in output_damage_whole_local_surface (output=0x101, surface=0xf01f10, ox=0, oy=32, rotation=0) at ../wlroots/rootston/output.c:635\n"
    >~"#1  0x000000000040edda in popup_handle_unmap (listener=0xed2e38, data=0xed3f70) at ../wlroots/rootston/layer_shell.c:315\n"
    >~"#2  0x00007ffff7babf04 in wlr_signal_emit_safe (signal=0xed4078, data=0xed3f70) at ../wlroots/util/signal.c:29\n"
    >~"#3  0x00007ffff7b884e4 in unmap_xdg_surface (surface=0xed3f70) at ../wlroots/types/xdg_shell/wlr_xdg_surface.c:34\n"
    >~"#4  0x00007ffff7b8927c in destroy_xdg_surface (surface=0xed3f70) at ../wlroots/types/xdg_shell/wlr_xdg_surface.c:425\n"
    >~"#5  0x00007ffff7b87ee6 in xdg_client_handle_resource_destroy (resource=0xedfbf0) at ../wlroots/types/xdg_shell/wlr_xdg_shell.c:71\n"
    >~"#6  0x00007ffff7934192 in destroy_resource (element=0xedfbf0, data=<optimized out>, flags=0) at src/wayland-server.c:688\n"
    >~"#7  0x00007ffff7938072 in for_each_helper (func=func@entry=0x7ffff7934130 <destroy_resource>, data=data@entry=0x7fffffffe10c, entries=<optimized out>, entries=<optimized out>) at src/wayland-util.c:372\n"
    >~"#8  0x00007ffff793857f in wl_map_for_each (map=0xeda100, func=0x7ffff7934130 <destroy_resource>, data=0x7fffffffe10c) at src/wayland-util.c:385\n"
    >~"#9  0x00007ffff79342dd in wl_client_destroy (client=0xeda0d0) at src/wayland-server.c:847\n"
    >~"#10 0x00007ffff7934388 in destroy_client_with_error (reason=<optimized out>, client=<optimized out>) at src/wayland-server.c:307\n"
    >~"#11 0x00007ffff7934388 in wl_client_connection_data (fd=<optimized out>, mask=<optimized out>, data=0xeda0d0) at src/wayland-server.c:330\n"
    >~"#12 0x00007ffff79359d2 in wl_event_loop_dispatch (loop=0x629ed0, timeout=timeout@entry=-1) at src/event-loop.c:641\n"
    >~"#13 0x00007ffff793471a in wl_display_run (display=0x632e70) at src/wayland-server.c:1260\n"
    >~"#14 0x000000000040f8a0 in main (argc=3, argv=0x7fffffffe4b8) at ../wlroots/rootston/main.c:74\n"
    >5061^done

    and from phosh:

    [2560853.789] wl_pointer@3.frame()
    [2561041.083] wl_pointer@3.motion(1197671169, 445.000000, 42.000000)
    [2561041.117] wl_pointer@3.frame()
    [2561053.480] wl_pointer@3.motion(1197671181, 441.000000, 39.000000)
    [2561053.524] wl_pointer@3.frame()
    [2561504.871] wl_pointer@3.button(51, 1197671631, 272, 1)
    [2561504.959] wl_pointer@3.frame()
    [2561506.193]  -> wl_surface@42.attach(wl_buffer@43, 0, 0)
    [2561506.256]  -> wl_surface@42.set_buffer_scale(1)
    [2561506.294]  -> wl_surface@42.damage(0, 26, 900, 25)
    [2561506.356]  -> wl_surface@42.frame(new id wl_callback@46)
    [2561506.381]  -> wl_surface@42.commit()
    [2561507.051] wl_display@1.delete_id(46)
    [2561507.080] wl_buffer@43.release()
    [2561507.094] wl_callback@46.done(1197671636)
    [2561578.726] wl_pointer@3.motion(1197671707, 441.000000, 39.000000)
    [2561578.796] wl_pointer@3.frame()
    [2561578.838] wl_pointer@3.button(52, 1197671707, 272, 0)
    [2561578.867] wl_pointer@3.frame()
    (phosh:25531): phosh-favorites-DEBUG: Will raise yad
    [2561579.162]  -> phosh_private_app_switcher@41.raise_app("yad")
    [2561579.755]  -> wl_surface@42.attach(wl_buffer@43, 0, 0)
    [2561579.797]  -> wl_surface@42.set_buffer_scale(1)
    [2561579.811]  -> wl_surface@42.damage(0, 26, 900, 25)
    [2561579.854]  -> wl_surface@42.frame(new id wl_callback@46)
    [2561579.872]  -> wl_surface@42.commit()
    [2561579.922] wl_display@1.error(wl_display@1, 0, "invalid object 41")
    (phosh:25531): Gdk-DEBUG: wl_display@1: error 0: invalid object 41
    
    Gdk-Message: Error 22 (Invalid argument) dispatching to Wayland display.
  • Guido Gunther added 1 commit

    added 1 commit

    • 95b605a9 - Add phosh_private_xdg_switcher protocol

    Compare with previous version

  • Guido Gunther resolved all discussions

    resolved all discussions

  • Dorota Czaplejewicz resolved all discussions

    resolved all discussions

  • Dorota Czaplejewicz resolved all discussions

    resolved all discussions

  • Apart from the crash, everything looks fine.

  • g_desktop_app_info_get_locale_string is in gio 2.56. I'll add a dependency to phosh since we're pulling it in implicitly via GTK+ atm.

  • No crash here (I tested both plain phosh and the app-switcher branch before submitting) - (you can't be using phosh master since (phosh:25531): phosh-favorites-DEBUG: Will raise yad) is not on master but only an app-switcher.

    Edited by Guido Gunther
  • I tested again and I'm still getting crashes on your private master branch of phosh: 29bcf5837d186.

  • There is no defined state in my private master branch. Either test the public master branch:

    https://source.puri.sm/Librem5/phosh

    or the the app-switcher branch in my repo:

    https://source.puri.sm/guido.gunther/phosh/tree/app-switcher

  • Guido Gunther mentioned in merge request phosh!109 (merged)

    mentioned in merge request phosh!109 (merged)

  • mentioned in commit b6a9169a

  • Please register or sign in to reply
    Loading