#421 "lxpanelctl run" works only once per lxpanel launch

closed-accepted
nobody
lxpanel (268)
5
2013-09-04
2011-10-23
No

I met with significant problem when I try to use Alt+F2 shortcut - works only for first time. I tried to find out some work around but I met with several unsolved discussions - e.g. https://bugs.launchpad.net/ubuntu/+source/lxpanel/+bug/769644 or http://web.archiveorange.com/archive/v/IHBTWiACH8JBpPj1LJ1j.
If I try to run "lxpanelctl run" in console it does nothing if I launch it from menu - just works..

Environment:
- uname -a
Linux nb 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
- lxpanel --version:
lxpanel 0.5.8
- Window manager - OpenBox
- Display manager - LXDM

Discussion

  • Ladislav Nesnera

    • summary: "lxpanelctl run" working only once --> "lxpanelctl run" works only once per lxpanel launch
     
  • Peter Edwards

    Peter Edwards - 2011-11-26

    Same problem experienced here. Tracked down it down to having the panel bypass GTK/GDK windowing methods for selecting events to receive (including the "ClientMessage" from lxpanelctl). Some of the interaction with gtk in the auto-complete stuff ends up clearing the directly-set bits of the mask on the root window, so future messages are never seen.

    Also, the run dialogue was not being created at the top of the windowing stack. I'm not a GTK/GDK expert at all, but the attached patch fixes both issues for me.

     
  • Peter Edwards

    Peter Edwards - 2011-11-26

    diff --git a/src/panel.c b/src/panel.c
    index 330defe..0fc7559 100644
    --- a/src/panel.c
    +++ b/src/panel.c
    @@ -1656,7 +1656,8 @@ restart:
    /* NOTE: StructureNotifyMask is required by XRandR
    * See init_randr_support() in gdkscreen-x11.c of gtk+ for detail.
    */
    - XSelectInput (GDK_DISPLAY(), GDK_ROOT_WINDOW(), StructureNotifyMask|SubstructureNotifyMask|PropertyChangeMask);
    + gdk_window_set_events(gdk_get_default_root_window(),
    + GDK_STRUCTURE_MASK | GDK_SUBSTRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK);
    gdk_window_add_filter(gdk_get_default_root_window (), (GdkFilterFunc)panel_event_filter, NULL);

    if( G_UNLIKELY( ! start_all_panels() ) )

     
  • Peter Edwards

    Peter Edwards - 2011-11-26

    diff --git a/src/gtk-run.c b/src/gtk-run.c
    index a6634e6..dbea730 100644
    --- a/src/gtk-run.c
    +++ b/src/gtk-run.c
    @@ -160,7 +160,7 @@ static void setup_auto_complete_with_data(ThreadData* data)
    gtk_list_store_set( store, &it, 0, name, -1 );
    }

    - gtk_entry_completion_set_model( comp, (GtkTreeModel*)store );
    + gtk_entry_completion_set_model( comp, GTK_TREE_MODEL(store));
    g_object_unref( store );
    gtk_entry_completion_set_text_column( comp, 0 );
    gtk_entry_set_completion( (GtkEntry*)data->entry, comp );
    @@ -344,6 +344,8 @@ void gtk_run()
    gtk_widget_show_all( win );

    setup_auto_complete( (GtkEntry*)entry );
    + gdk_window_raise( win->window );
    + gtk_window_present(GTK_WINDOW(win));
    gtk_widget_show( win );

    g_signal_connect(entry ,"changed", G_CALLBACK(on_entry_changed), img);

     
  • Henry Gebhardt

    Henry Gebhardt - 2013-09-04
    • status: open --> closed-accepted
     
  • Henry Gebhardt

    Henry Gebhardt - 2013-09-04

    Thanks, please test latest master branch.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks