GTK docking interfaces and more

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

Pop out when dragged outside

roundabout,
created on Thursday, 6 March 2025, 14:40:52 (1741272052), received on Thursday, 6 March 2025, 14:40:54 (1741272054)
Author identity: vlad <vlad.muntoiu@gmail.com>

803f5782a65dacdd9e042ee2d48036f7c6388a76

gpanthera.cc

@@ -298,6 +298,14 @@ namespace gPanthera {

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        drag_source->set_actions(Gdk::DragAction::MOVE);
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        return Gdk::ContentProvider::create(value);
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    }, false);
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                // Pop out if dragged to an external location
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                drag_source->signal_drag_cancel().connect([this](const Glib::RefPtr<Gdk::Drag>&, Gdk::DragCancelReason reason) {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    if(reason == Gdk::DragCancelReason::NO_TARGET) {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        this->pane->pop_out();
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                        return true;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    return false;
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                }, false);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    this->update_active_style();
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                }