forked from mirrors/gecko-dev
		
	Bug 1884243 [Wayland] Flip GTK_DRAG_RESULT_ERROR to GTK_DRAG_RESULT_NO_TARGET on Wayland as Gecko expects it r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D211189
This commit is contained in:
		
							parent
							
								
									377f0388d1
								
							
						
					
					
						commit
						46acdfb552
					
				
					 1 changed files with 3 additions and 9 deletions
				
			
		|  | @ -2460,16 +2460,10 @@ static gboolean invisibleSourceDragFailed(GtkWidget* aWidget, | ||||||
|   // GDK_DRAG_CANCEL_ERROR error code
 |   // GDK_DRAG_CANCEL_ERROR error code
 | ||||||
|   // (see data_source_cancelled/gdkselection-wayland.c).
 |   // (see data_source_cancelled/gdkselection-wayland.c).
 | ||||||
|   // Bug 1527976
 |   // Bug 1527976
 | ||||||
|  |   // Emulate what X11 does here as Gecko expect it and handles NO_TARGET
 | ||||||
|  |   // result correctly according to drop destination.
 | ||||||
|   if (widget::GdkIsWaylandDisplay() && aResult == GTK_DRAG_RESULT_ERROR) { |   if (widget::GdkIsWaylandDisplay() && aResult == GTK_DRAG_RESULT_ERROR) { | ||||||
|     for (GList* tmp = gdk_drag_context_list_targets(aContext); tmp; |     aResult = GTK_DRAG_RESULT_NO_TARGET; | ||||||
|          tmp = tmp->next) { |  | ||||||
|       if (nsDragService::sTabDropTypeAtom == GDK_POINTER_TO_ATOM(tmp->data)) { |  | ||||||
|         aResult = GTK_DRAG_RESULT_NO_TARGET; |  | ||||||
|         LOGDRAGSERVICESTATIC("invisibleSourceDragFailed(%p): Wayland tab drop", |  | ||||||
|                              aContext); |  | ||||||
|         break; |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   LOGDRAGSERVICESTATIC("invisibleSourceDragFailed(%p) %s", aContext, |   LOGDRAGSERVICESTATIC("invisibleSourceDragFailed(%p) %s", aContext, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 stransky
						stransky