-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
At the end of drag and drop, grab and release seat #517
Conversation
@cwendling Do you accept this repair method |
@cwendling Looking forward to your review |
gboolean viewable = TRUE; | ||
GtkWidget *tmp = parent; | ||
while (tmp) | ||
{ | ||
if (!gtk_widget_get_mapped (tmp)) | ||
{ | ||
viewable = FALSE; | ||
break; | ||
} | ||
tmp = gtk_widget_get_parent (tmp); | ||
} | ||
|
||
if (viewable) | ||
xgrab_shell = parent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this nested loop about? Removing it seems logically identical (and working the same) save not being quadratic:
gboolean viewable = TRUE; | |
GtkWidget *tmp = parent; | |
while (tmp) | |
{ | |
if (!gtk_widget_get_mapped (tmp)) | |
{ | |
viewable = FALSE; | |
break; | |
} | |
tmp = gtk_widget_get_parent (tmp); | |
} | |
if (viewable) | |
xgrab_shell = parent; | |
if (gtk_widget_get_mapped (parent)) | |
xgrab_shell = parent; | |
else | |
break; |
|
||
seat = gdk_display_get_default_seat (display); | ||
gdk_seat_grab (seat, window, | ||
GDK_SEAT_CAPABILITY_ALL, TRUE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably sufficient
GDK_SEAT_CAPABILITY_ALL, TRUE, | |
GDK_SEAT_CAPABILITY_ALL_POINTING, TRUE, |
@zhuyaliang I don't like the "fix", but at least it seems to work. The root issue seems to be inside src/eggtreemultidnd.c's |
@zhuyaliang are you working on a better fix? I didn't mean to say we mustn't do this, just that it feels like a fairly sad hack. I have however for now no real clue how to fix it properly (save on pcmanfm's side by not querying the data on drag-motion), and probably won't have time to dive into this. |
@cwendling I suspect that the problem lies within |
@cwendling I tried to fix the problem in libfm but I'm not sure if this fix is correct,Please help review the code |
There are other issues with |
Fix #515