Bug 322852

Summary: Quick maximizing doesn't work when window already has maximized size
Product: kwin Reporter: Kai Uwe Broulik <kde>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Severity: normal    
Priority: NOR    
Version: 4.10.95   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 4.11

Description Kai Uwe Broulik 2013-07-26 17:04:57 UTC
When a window has the same size as it would have when maximized (VLC seems to do this quite often), quick maximizing by dragging the window to the top doesn't work. No rectangle appears, and the window doesn't maximize. First dragging it to quick tile somewhere else and then maximizing works.


xwininfo: Please select the window about which you
          would like information by clicking the
          mouse in that window.

xwininfo: Window id: 0x2200002 "n-BXNXvTvV4.mp4 - VLC media player"

  Absolute upper-left X:  0
  Absolute upper-left Y:  55
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1920
  Height: 1025
  Depth: 24
  Visual: 0x21
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +0+55  -0+55  -0-0  +0-0
  -geometry 1920x1025+0-0

My screen resolution is 1920x1080 with a 55px panel at the top

Reproducible: Always

Steps to Reproduce:
1. Open a FullHD video in VLC (?)
2. Try quick maximizing window
Actual Results:  
Doesn't work

Expected Results:  
Comment 1 Thomas Lübking 2013-07-26 18:01:44 UTC
"When a window has the same size as it would have when maximized"
This translates to:
"When a window STARTS with the same size as it would have when maximized"?

In that case the window actually is initially maximized (check "xprop | grep _NET_WM_STATE")

Now you got to explain why you'd expect a maximized window to perform quick maximization ;-)
Comment 2 Kai Uwe Broulik 2013-07-26 18:18:13 UTC
It's not maximized, it has decoration (have borderless maximized windows enabled) and can be maximized and restored
Comment 3 Thomas Lübking 2013-07-26 18:24:22 UTC
Please attach the complete "xprop" output then.
Comment 4 Kai Uwe Broulik 2013-07-27 08:49:12 UTC
_KDE_NET_WM_ACTIVITIES(STRING) = "c48aa374-5fb6-4d99-bea6-a2e1f57ea436"
		window state: Normal
		icon window: 0x0
_NET_WM_ICON(CARDINAL) = 	Icon (32 x 32):
	          ░ ░░░░░░░░░           
	         ░           ░░         
	          ░         ░ ░         
	         ░           ░          
	        ▒░            ░▒        
	       ▒▒▒░░         ░▒▒▒       

XdndAware(ATOM) = BITMAP
_MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
_NET_WM_NAME(UTF8_STRING) = "jDELybyZ4oU.mp4 - VLC media player"
WM_CLIENT_LEADER(WINDOW): window id # 0x3200004
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0
WM_NAME(STRING) = "jDELybyZ4oU.mp4 - VLC media player"
WM_CLASS(STRING) = "vlc", "Vlc"
		Client accepts input or input focus: True
		Initial state is Normal State.
		bitmap id # to use for icon: 0x320000d
		window id # of group leader: 0x3200004
		user specified location: 0, 28
		program specified location: 0, 28
		user specified size: 1920 by 887
		program specified size: 1920 by 887
		program specified minimum size: 435 by 55
		window gravity: NorthWest
WM_CLIENT_MACHINE(STRING) = "kaiuwe-tragbar2"
WM_COMMAND(STRING) = { "vlc" }
Comment 5 Thomas Lübking 2013-07-27 09:15:25 UTC
That's a funny one - quick maximization only works when moving the window to the top and then perform an additional slight horizontal move - what does not work if the window is guided because either (in this case) it's horizontally maximized or du to screen snapping.

No idea whether the mentioned behavior is intended, though.
Comment 6 Martin Flöser 2013-07-29 04:52:39 UTC
> No idea whether the mentioned behavior is intended, though.
I would say no
Comment 7 Thomas Lübking 2013-08-02 20:58:15 UTC
Git commit 652d1c1cade55adb3a9ed87a29859d76d749578d by Thomas Lübking.
Committed on 27/07/2013 at 11:09.
Pushed by luebking into branch 'KDE/4.11'.

don't require geometry changes for quick max/tile

the present check can break quick everything depending
on screen snapping settings.
It so far. only worked for quick maximization due to horizontal
"judder" and failed whenever that judder was not possible
(due to screen snapping on left and/or right edge)
FIXED-IN: 4.11
REVIEW: 111740

M  +3    -3    kwin/events.cpp