Bug 11489 - Xamarin Studio resizes after adding item to solution
Summary: Xamarin Studio resizes after adding item to solution
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Shell ()
Version: 4.0.3
Hardware: PC Windows
: Low minor
Target Milestone: Future Cycle (TBD)
Assignee: Marius Ungureanu
Depends on:
Reported: 2013-03-31 05:48 UTC by Greg Brant
Modified: 2017-05-15 22:26 UTC (History)
6 users (show)

Tags: gtk+
Is this bug a regression?: ---
Last known good build:

Before adding new item to project (2.50 MB, image/png)
2013-03-31 05:48 UTC, Greg Brant

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 11489 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Greg Brant 2013-03-31 05:48:28 UTC
Created attachment 3722 [details]
Before adding new item to project

I'm running Windows 8 Pro, I have Xamarin Studio snapped to the left hand side of my screen using Windows + Left Arrow. When I add a new item to a project, Xamarin Studio resizes and repositions it's self on the screen.

See beforeafter.png attached.

Repro steps

 1. Open Xamarin Studio
 2. Open or create a solution
 3. Snap Xamarin Studio to the side of the screen (left or right, doesn't matter) with Windows + Arrow Key.
 4. Add new item to project. Right click project > Add > New File > ... > Ok
 5. Observe Xamarin Studio is resized and repositioned in the centre of the screen.

Xamarin Studio info

Xamarin Studio
Version 4.0.3 (build 13)
Installation UUID: 27441552-2042-46aa-a1b8-b937f6c563e0
	Microsoft .NET 4.0.30319.18033
	GTK 2.24.13
	GTK# (

Version: 4.6.0 (Starter Edition)
Android SDK: C:\Program Files (x86)\Android\android-sdk
	Supported Android versions:
		2.1 (API level 7)
		2.2 (API level 8)
		2.3 (API level 10)
		3.1 (API level 12)
		4.0 (API level 14)
		4.2 (API level 17)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_31

Build Information
Release ID: 400030013
Build date: 2013-03-21 15:53:00Z
Xamarin addins: 906a1edff23bcfd0ab7518463620a8ee506eaea2

Operating System
Windows 6.2.9200.0 (64-bit)
Comment 1 Mikayla Hutchinson [MSFT] 2013-04-01 16:30:19 UTC
GTK issue, we've seen this before (but I can't find the bug to mark dup). 

Basically, if the window is snapped using windows 7+ Aero Snap, then the next time gtk_window_present is called, it resets to its previous size.
Comment 2 Aleksander Morgado 2013-04-15 06:05:47 UTC
I tried to reproduce it in a Win7 VM without using Windows+Left or Windows+Right (can't pass Super properly to the VM it seems). Instead I grabbed the whole window to the left border to make it adjust itself in the left side of the screen, which I believe is what Windows+Left should be doing. Couldn't reproduce the issue while doing that. Is this only reproducible with the Aero Snap being triggered with the keyboard?
Comment 3 Greg Brant 2013-04-15 06:08:48 UTC
I just reproduced the issue by slamming the Xamarin Studio window to the left edge of the screen with the mouse. It is not just the keyboard.
Comment 4 Aleksander Morgado 2013-04-15 07:00:00 UTC
No, cannot reproduce it like that. One weird thing, though, is that the result of the Aero Snap here is *not* exactly half of the screen,  it's bit more, as if the XS window had a minimum width. I'm using a VM with a resolution of 1600x788 here.
Comment 5 Aleksander Morgado 2013-04-18 14:02:08 UTC
Michael: could it have been bug 489?
Comment 6 Mikayla Hutchinson [MSFT] 2013-04-20 01:08:59 UTC
Sounds like it, not sure why that workaround isn't working here?
Comment 7 Aleksander Morgado 2013-04-22 09:44:58 UTC
Michael, can you point me to the workaround fix? Just to check how it was avoided. Also, I cannot reproduce this myself. Are you able to reproduce it?
Comment 8 Mikayla Hutchinson [MSFT] 2013-04-22 10:30:57 UTC
Aleksander: https://github.com/mono/monodevelop/commit/9096f17ca30abcfd209c4f090e5c736ce984ecd0
Comment 9 Aleksander Morgado 2013-04-22 10:38:24 UTC
what's your screen resolution? Can you reproduce the issue with smaller resolutions?
Comment 10 Greg Brant 2013-04-22 10:41:28 UTC
Native is 1920x1200 and I've just reproduced using Win+Left Arrow and the mouse at 1280x800
Comment 11 Aleksander Morgado 2013-04-22 11:30:05 UTC
I can easily reproduce the issue when disabling mhutch's hack, I'll try to look at the inner GTK+ issue and see if it that fixes Greg's issue as well.
Comment 12 Aleksander Morgado 2013-04-23 08:19:45 UTC
Upstream bugreport:


There's a patch attached which still needs review.
Comment 13 Tyson 2015-03-16 12:54:56 UTC
I get the same issue when SELECTING something that already exists in the solution explorer.  I have XS Tiled to the left side of the screen and Notepad++ tiled to the right.

When I select an item on the solution explorer tree XS window resizes to a non-maximized/unsnapped size.

IT did not do this last week.  Mondays...

I'm using the Windows 10 beta. Resolution: 1920x1080

Xamarin Studio
Version 5.7.2 (build 7)
Installation UUID: ba4046bd-8d25-43fc-b740-b12a4f0d1f5c
	Microsoft .NET 4.0.30319.0
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26
Comment 15 Kirill Osenkov 2017-05-15 22:26:43 UTC
It looks like this may be fixed in GTK 2.24. Since we're still using GTK 2.12 I think this will be blocked until we upgrade to a newer GTK.

Marius, shall we let this be open as a reminder to move to a newer GTK? It'd be nice to confirm that this is gone after we upgrade GTK.