Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 27718 | Differences between
and this patch

Collapse All | Expand All

(-)fluxbox-0.1.14/src/Screen.cc (+1 lines)
Lines 223-228 Link Here
223
workspaces(rm, 1, scrname+".workspaces", altscrname+".Workspaces"),
223
workspaces(rm, 1, scrname+".workspaces", altscrname+".Workspaces"),
224
toolbar_width_percent(rm, 65, scrname+".toolbar.widthPercent", altscrname+".Toolbar.WidthPercent"),
224
toolbar_width_percent(rm, 65, scrname+".toolbar.widthPercent", altscrname+".Toolbar.WidthPercent"),
225
edge_snap_threshold(rm, 0, scrname+".edgeSnapThreshold", altscrname+".EdgeSnapThreshold"),
225
edge_snap_threshold(rm, 0, scrname+".edgeSnapThreshold", altscrname+".EdgeSnapThreshold"),
226
window_snap_threshold(rm, 0, scrname+".windowSnapThreshold", altscrname+".WindowSnapThreshold"), /*SHAWN WAS HERE */
226
tab_width(rm, 64, scrname+".tab.width", altscrname+".Tab.Width"),
227
tab_width(rm, 64, scrname+".tab.width", altscrname+".Tab.Width"),
227
tab_height(rm, 16, scrname+".tab.height", altscrname+".Tab.Height"),
228
tab_height(rm, 16, scrname+".tab.height", altscrname+".Tab.Height"),
228
tab_placement(rm, Tab::PTOP, scrname+".tab.placement", altscrname+".Tab.Placement"),
229
tab_placement(rm, Tab::PTOP, scrname+".tab.placement", altscrname+".Tab.Placement"),
(-)fluxbox-0.1.14/src/Screen.hh (-1 / +3 lines)
Lines 147-153 Link Here
147
147
148
	inline int getToolbarWidthPercent() const { return *resource.toolbar_width_percent; }
148
	inline int getToolbarWidthPercent() const { return *resource.toolbar_width_percent; }
149
	inline int getPlacementPolicy() const { return resource.placement_policy; }
149
	inline int getPlacementPolicy() const { return resource.placement_policy; }
150
    inline int getWindowSnapThreshold(void) const { return *resource.window_snap_threshold; } /* SHAWN WAS HERE */
150
	inline int getRowPlacementDirection() const { return resource.row_direction; }
151
	inline int getRowPlacementDirection() const { return resource.row_direction; }
151
	inline int getColPlacementDirection() const { return resource.col_direction; }
152
	inline int getColPlacementDirection() const { return resource.col_direction; }
152
	inline unsigned int getTabWidth() const { return *resource.tab_width; }
153
	inline unsigned int getTabWidth() const { return *resource.tab_width; }
Lines 173-178 Link Here
173
	inline void saveRowPlacementDirection(int d) { resource.row_direction = d;  }
174
	inline void saveRowPlacementDirection(int d) { resource.row_direction = d;  }
174
	inline void saveColPlacementDirection(int d) { resource.col_direction = d;  }
175
	inline void saveColPlacementDirection(int d) { resource.col_direction = d;  }
175
	inline void saveEdgeSnapThreshold(int t) { resource.edge_snap_threshold = t;  }
176
	inline void saveEdgeSnapThreshold(int t) { resource.edge_snap_threshold = t;  }
177
        inline void saveWindowSnapThreshold(int t) { resource.window_snap_threshold = t; } /* SHAWN WAS HERE */
176
	inline void saveImageDither(bool d) { resource.image_dither = d;  }
178
	inline void saveImageDither(bool d) { resource.image_dither = d;  }
177
	inline void saveMaxOverSlit(bool m) { resource.max_over_slit = m;  }
179
	inline void saveMaxOverSlit(bool m) { resource.max_over_slit = m;  }
178
	inline void saveOpaqueMove(bool o) { resource.opaque_move = o;  }
180
	inline void saveOpaqueMove(bool o) { resource.opaque_move = o;  }
Lines 337-343 Link Here
337
		bool auto_raise, sloppy_focus, semi_sloppy_focus,
339
		bool auto_raise, sloppy_focus, semi_sloppy_focus,
338
			ordered_dither;
340
			ordered_dither;
339
		Resource<int> workspaces, toolbar_width_percent, edge_snap_threshold,
341
		Resource<int> workspaces, toolbar_width_percent, edge_snap_threshold,
340
			tab_width, tab_height;
342
		        window_snap_threshold, /*SHAWN WAS HERE*/tab_width, tab_height;
341
		int placement_policy, row_direction, col_direction;
343
		int placement_policy, row_direction, col_direction;
342
344
343
		Resource<Tab::Placement> tab_placement;
345
		Resource<Tab::Placement> tab_placement;
(-)fluxbox-0.1.14/src/Window.cc (+58 lines)
Lines 2987-2992 Link Here
2987
				else if (dby > 0 && dby < screen->getEdgeSnapThreshold())
2987
				else if (dby > 0 && dby < screen->getEdgeSnapThreshold())
2988
					dy = dbby - frame.snap_h;
2988
					dy = dbby - frame.snap_h;
2989
			}
2989
			}
2990
 			if (screen->getWindowSnapThreshold()) {
2991
 			  int height = (isShaded() ? getTitleHeight() : getHeight()); // height of the window that is moving
2992
 			  int mindistx=screen->getWindowSnapThreshold(), 
2993
 			      mindisty=screen->getWindowSnapThreshold(), 
2994
 			      newdx=dx, 
2995
 			      newdy=dy;
2996
 			  Workspace::Windows winlist = 
2997
 			    getScreen()->getWorkspace(getWorkspaceNumber())->getWindowList();
2998
 
2999
 			  
3000
 			  int x1,y1,x2,y2;
3001
 			  for (unsigned int i=0; i<winlist.size(); i++) {
3002
   			      if (winlist[i]==this)
3003
 				continue;  // dont check the current window against itself
3004
 
3005
 			      x1 = (int) winlist[i]->getXFrame();
3006
 			      y1 = (int) winlist[i]->getYFrame();
3007
 			      x2 = (int)winlist[i]->getXFrame()
3008
 				+(int)winlist[i]->getWidth();
3009
 			      if (winlist[i]->isShaded())
3010
 				y2 = y1+getTitleHeight();
3011
 			      else
3012
 				y2 = (int)winlist[i]->getYFrame()
3013
 				  +(int)winlist[i]->getHeight();
3014
 			      
3015
 			      // check right edge of window with left edge of other windows
3016
 			      if ((dy < y2) && (dy+height > y1) &&
3017
 				  (abs(x1-dx-(int)getWidth()) < mindistx)) {
3018
 				mindistx = abs(x1-dx-(int)getWidth());
3019
 				newdx = x1-1-getWidth();
3020
 			      }
3021
 
3022
 			      // check left edge of window with right edge of other windows
3023
 			      if ((dy<y2) && (dy+height>y1) &&
3024
 				  (abs(dx-x2) < mindistx)) {
3025
 				mindistx = abs(dx-x2);
3026
 				newdx = x2+1;
3027
 			      }
3028
 
3029
 			      // check bottom edge of window with top edge of other windows
3030
 			      if ((dx < x2) && (dx+(int)getWidth() > x1) &&
3031
 				  (abs(y1-dy-height) < mindisty)) {
3032
 				mindisty = abs(y1-dy-height);
3033
 				newdy = y1-1-height;
3034
 			      }
3035
 
3036
 			      // check top edge of window with bottom edge of other windows
3037
 			      if ((dx < x2) && (dx+(int)getWidth() > x1) &&
3038
 				  (abs(dy-y2) < mindisty)) {
3039
 				mindisty = abs(dy-y2);
3040
 				newdy = y2+1;
3041
 			      }
3042
 			  }
3043
 			  
3044
 			  dx = newdx;
3045
 			  dy = newdy;
3046
 			}
3047
 			
2990
			// Warp to next or previous workspace?, must have moved sideways some
3048
			// Warp to next or previous workspace?, must have moved sideways some
2991
			int moved_x=me->x_root - frame.resize_x;
3049
			int moved_x=me->x_root - frame.resize_x;
2992
			// save last event point
3050
			// save last event point

Return to bug 27718