wok-next diff pcmanfm/stuff/patches/fix_desktop_menus.patch @ rev 19925

libftdi: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Oct 14 23:27:36 2017 +0200 (2017-10-14)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/pcmanfm/stuff/patches/fix_desktop_menus.patch	Sat Oct 14 23:27:36 2017 +0200
     1.3 @@ -0,0 +1,74 @@
     1.4 +Commit: http://git.lxde.org/gitweb/?p=lxde/pcmanfm.git;a=commit;h=ae7ed3af651041a5538634ac9e35dc479e280ad9
     1.5 +We revert it to fix desktop Openbox menus: Cannot open Right-click and Middle-Click menu in same time.
     1.6 +--- a/src/desktop.c
     1.7 ++++ b/src/desktop.c
     1.8 +@@ -3314,12 +3314,9 @@ static gboolean on_button_press(GtkWidget* w, GdkEventButton* evt)
     1.9 + 
    1.10 +     if(evt->type == GDK_BUTTON_PRESS)
    1.11 +     {
    1.12 +-        /* ignore another buttons while some is in progress */
    1.13 +-        if (self->button_pressed == 0)
    1.14 +-            self->button_pressed = evt->button;
    1.15 +         if(evt->button == 1)  /* left button */
    1.16 +         {
    1.17 +-            /* store button state for drag & drop */
    1.18 ++            self->button_pressed = TRUE;    /* store button state for drag & drop */
    1.19 +             self->drag_start_x = evt->x;
    1.20 +             self->drag_start_y = evt->y;
    1.21 +         }
    1.22 +@@ -3431,6 +3425,10 @@ static gboolean on_button_press(GtkWidget* w, GdkEventButton* evt)
    1.23 + static gboolean on_button_release(GtkWidget* w, GdkEventButton* evt)
    1.24 + {
    1.25 +     FmDesktop* self = (FmDesktop*)w;
    1.26 ++    GtkTreeIter it;
    1.27 ++    FmDesktopItem* clicked_item = hit_test(self, &it, evt->x, evt->y);
    1.28 ++
    1.29 ++    self->button_pressed = FALSE;
    1.30 + 
    1.31 +     if(self->rubber_bending)
    1.32 +     {
    1.33 +@@ -3444,21 +3442,17 @@ static gboolean on_button_release(GtkWidget* w, GdkEventButton* evt)
    1.34 +     }
    1.35 +     else if(fm_config->single_click && evt->button == 1)
    1.36 +     {
    1.37 +-        GtkTreeIter it;
    1.38 +-        FmDesktopItem* clicked_item = hit_test(self, &it, evt->x, evt->y);
    1.39 +         if(clicked_item)
    1.40 ++        {
    1.41 +             /* left single click */
    1.42 +             fm_launch_file_simple(GTK_WINDOW(w), NULL, clicked_item->fi, pcmanfm_open_folder, w);
    1.43 ++            return TRUE;
    1.44 ++        }
    1.45 +     }
    1.46 + 
    1.47 +     /* forward the event to root window */
    1.48 +-    if (self->button_pressed == evt->button)
    1.49 +-    {
    1.50 +-        if (self->forward_pending)
    1.51 +-            forward_event_to_rootwin(gtk_widget_get_screen(w), (GdkEvent*)evt);
    1.52 +-        self->button_pressed = 0;
    1.53 +-        self->forward_pending = FALSE;
    1.54 +-    }
    1.55 ++    if(! clicked_item)
    1.56 ++        forward_event_to_rootwin(gtk_widget_get_screen(w), (GdkEvent*)evt);
    1.57 + 
    1.58 +     return TRUE;
    1.59 + }
    1.60 +--- a/src/desktop.h
    1.61 ++++ b/src/desktop.h
    1.62 +@@ -73,13 +73,14 @@ struct _FmDesktop
    1.63 +     gint drag_start_x;
    1.64 +     gint drag_start_y;
    1.65 +     gboolean rubber_bending : 1;
    1.66 +-    gboolean forward_pending : 1;
    1.67 ++    gboolean button_pressed : 1;
    1.68 +     gboolean dragging : 1;
    1.69 +     gboolean layout_pending : 1;
    1.70 +     guint idle_layout;
    1.71 +     FmDndSrc* dnd_src;
    1.72 +     FmDndDest* dnd_dest;
    1.73 +     guint single_click_timeout_handler;
    1.74 +-    guint button_pressed;
    1.75 +     FmFolderModel* model;
    1.76 +     guint cur_desktop;
    1.77 +     gint monitor;