After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 163420 - Vertical maximization broken on second screen
Vertical maximization broken on second screen
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
2.9.x
Other All
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2005-01-09 05:05 UTC by Ryan Lovett
Modified: 2005-01-24 04:22 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
src/window.c (check_maximize_to_work_area): Fix. (568 bytes, patch)
2005-01-22 11:34 UTC, John Paul Wallington
accepted-commit_now Details | Review

Description Ryan Lovett 2005-01-09 05:05:24 UTC
Please describe the problem:
I've bound Shift-Alt-F12 to vertically maximize a window. This works fine on the
first screen, but on the second, it will maximize the window to fill the whole
screen. When I then click on the unmaximize window button, the window remains
vertically maximized, and its horizontal width is normal again.

Shift-Alt-F12 works fine on the first screen.



Steps to reproduce:
1. Put a window on the second screen of a MergedFB X device.
2. Create a key binding for vertically maximizing the window.
3. Press the key binding.


Actual results:
The window maximizes in all directions.

Expected results:
The window should only maximize vertically.

Does this happen every time?
Yes.

Other information:
Contents of my xorg.conf on Ubuntu hoary:

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following commands as root:
#
#   cp /etc/X11/xorg.conf /etc/X11/xorg.conf.custom
#   md5sum /etc/X11/xorg.conf >/var/lib/xorg//etc/X11/xorg.conf.md5sum
#   dpkg-reconfigure xserver-xorg

Section "Files"
	FontPath	"unix/:7100"			# local font server
	# if the local font server has problems, we can fall back on these
	FontPath	"/usr/lib/X11/fonts/misc"
	FontPath	"/usr/lib/X11/fonts/cyrillic"
	FontPath	"/usr/lib/X11/fonts/100dpi/:unscaled"
	FontPath	"/usr/lib/X11/fonts/75dpi/:unscaled"
	FontPath	"/usr/lib/X11/fonts/Type1"
	FontPath	"/usr/lib/X11/fonts/CID"
	FontPath	"/usr/lib/X11/fonts/Speedo"
	FontPath	"/usr/lib/X11/fonts/100dpi"
	FontPath	"/usr/lib/X11/fonts/75dpi"
	# paths to defoma fonts
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
EndSection

Section "Extensions"
	Option	"Composite"	"enable"
EndSection

Section "Module"
	Load	"GLcore"
	Load	"bitmap"
	Load	"dbe"
	Load	"ddc"
	Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"record"
	Load	"speedo"
	Load	"type1"
	Load	"v4l"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"keyboard"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc104"
	Option		"XkbLayout"	"us"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	Option		"Emulate3Buttons"	"true"
	Option		"ZAxisMapping"		"4 5"
	Option		"Buttons"		"5"
EndSection

## Devices
Section "Device"
	Identifier      "MergedDevice"
	VendorName      "ATI"
	BoardName       "Radeon 8500 QL"
	Driver	  	"ati"
	BusID	   "PCI:1:0:0"
	Option	  "AGPMode"       "1"
	Option	  "MergedFB"      "True"
	Option	  "CRT2Position"  "RightOf"
	Option	  "EnablePageFlip" "true"
	Option	  "RenderAccel" "true"
	Option	"MetaModes"	"1280x1024-1280x1024"
EndSection


Section "Device"
	Identifier	"ATI Technologies, Inc. Radeon 8500 (R200 QL)"
	Driver		"ati"
	BusID		"PCI:1:0:0"
EndSection

## Monitors
Section "Monitor"
	Identifier      "Samsung"
	HorizSync       31-80
	VertRefresh     60-75
	Option	  "dpms"
EndSection
Section "Monitor"
	Identifier      "900U"
	VendorName      "MEL"
	ModelName       "900U"
	HorizSync       30-95
	VertRefresh     50-152
	Option	  "dpms"
EndSection

## Screens
Section "Screen"
	Identifier      "MergedScreen"
	Device	  "MergedDevice"
	DefaultDepth    24
	Monitor	 "Samsung"
	Subsection "Display"
		Depth 24
		Virtual 2560 1024
	EndSubSection
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"ATI Technologies, Inc. Radeon 8500 (R200 QL)"
	Monitor		"900U"
	DefaultDepth	24
	SubSection "Display"
		Depth		8
		Modes		"1280x1024" "1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		15
		Modes		"1280x1024" "1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		16
		Modes		"1280x1024" "1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth		24
		Modes		"1280x1024" "1024x768" "800x600" "640x480"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Merged Layout"
	Screen		"MergedScreen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
EndSection

Section "DRI"
	Mode	0666
EndSection
Comment 1 John Paul Wallington 2005-01-22 11:34:58 UTC
Created attachment 36371 [details] [review]
src/window.c (check_maximize_to_work_area): Fix.
Comment 2 John Paul Wallington 2005-01-22 11:38:00 UTC
Same here with a Xinerama setup.
The problem is in window.c:check_maximize_to_work_area()

2005-01-22  John Wallington  <jpw@gnu.org>

	* src/window.c (check_maximize_to_work_area): Correct check for
	when window fill workarea.

--- window.c	22 Jan 2005 10:14:24 +0000	1.361
+++ window.c	22 Jan 2005 11:26:14 +0000	
@@ -2895,9 +2895,9 @@
 
   if ( rect.x >= work_area->x &&
        rect.y >= work_area->y &&
-       (((work_area->width - work_area->x) - rect.width) <
+       (((work_area->width + work_area->x) - (rect.width + rect.x)) <
         window->size_hints.width_inc) &&
-       (((work_area->height - work_area->y) - rect.height) <
+       (((work_area->height + work_area->y) - (rect.height + rect.y)) <
         window->size_hints.height_inc) )
     meta_window_maximize (window);
 }


Comment 3 Havoc Pennington 2005-01-23 00:49:53 UTC
Comment on attachment 36371 [details] [review]
src/window.c (check_maximize_to_work_area): Fix.

Looks right to me.
Comment 4 Elijah Newren 2005-01-24 04:22:09 UTC
Since the 2.9.90 tarballs are due tomorrow, I went ahead and committed so it
could be part of the release.