~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/core/Mono.Texteditor/Mono.TextEditor/GtkWorkarounds.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2012-02-05 10:49:36 UTC
  • mto: (10.3.1)
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: package-import@ubuntu.com-20120205104936-4ujoylapu24cquuo
Tags: upstream-2.8.6.3+dfsg
ImportĀ upstreamĀ versionĀ 2.8.6.3+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
                        float x, y, width, height;
156
156
                        
157
157
                        if (visible.Height < frame.Height) {
158
 
                                float dockHeight = visible.Y;
 
158
                                float dockHeight = visible.Y - frame.Y;
159
159
                                float menubarHeight = (frame.Height - visible.Height) - dockHeight;
160
160
                                
161
161
                                height = frame.Height - menubarHeight - dockHeight;
314
314
                                        bool flip_left = true;
315
315
                                        bool flip_up   = false;
316
316
                                        
317
 
                                        int x_over = x + request.Width - geometry.Right;
318
 
                                        if (x_over > 0) {
 
317
                                        if (x + request.Width > geometry.Right) {
319
318
                                                if (flip_left) {
320
319
                                                        x -= request.Width;
321
320
                                                } else {
322
 
                                                        x -= x_over;
 
321
                                                        x = geometry.Right - request.Width;
323
322
                                                }
 
323
                                                
 
324
                                                if (x < geometry.Left)
 
325
                                                        x = geometry.Left;
324
326
                                        }
325
327
                                        
326
 
                                        int y_over = y + request.Height - geometry.Bottom;
327
 
                                        if (y_over > 0) {
 
328
                                        if (y + request.Height > geometry.Bottom) {
328
329
                                                if (flip_up) {
329
330
                                                        y -= request.Height;
330
331
                                                } else {
331
 
                                                        y -= y_over;
 
332
                                                        y = geometry.Bottom - request.Height;
332
333
                                                }
 
334
                                                
 
335
                                                if (y < geometry.Top)
 
336
                                                        y = geometry.Top;
333
337
                                        }
334
338
                                        
335
 
                                        y = System.Math.Max (geometry.Top, System.Math.Min (y, geometry.Bottom - request.Height));
336
 
                                        x = System.Math.Max (geometry.Left, System.Math.Min (x, geometry.Right - request.Width));
337
 
                                        
338
339
                                        pushIn = false;
339
340
                                };
340
341
                        }