Page MenuHomePhabricator

switching virtual desktops (pager_plain) causes programs to change their size and/or position
Closed, ResolvedPublic

Description

i've made 3 recordings of strange new behaviour of pager_plain and switching between virtual desktops with XVidCap (watch with ImageMagicks animate). they are in this github repo. it's very confusing and hard to describe...

a) i have tiling set on virtual desktops 2-4. when i open a program in one of these (eg. terminal) it's obviously maximized. when i switch to another virtual desktop and then back sometimes they are not fullscreen anymore, but a little bit shorter. (screenshot, look at the terminal. hint: left and right screens are 1280x1024, center is 1920x1080). this could be another issue with focus, too, as then they haven’t got their focus back and won't get it back unless i resize the window with my mouse binding (see below). also their content is not drawn while this happens (eg top just hangs).

b) [switchbetweenvirtualdesktops.tar.xz]: i don't know if it's related or not, but when changing virtual desktops some icons in the pager_plain "jump" (regardless if i switched from that virtual desktop or to it).

c) [opensettings.tar.xz]: icons also "jump" in the pager_plain when i open or close settings. maybe these windows get resized for whatever reason and the pager reacts? this would fit with d).

d) when switching back to a virtual desktop, a maximized window, here nautilus, is resized and repositioned to the full length of the screen (screenshot) and under my shelve. interestingly immediately after i pressed the print key the window was again resized and reposition to it's original position just right of the shelve. however, at random, it might also be resized to be greater on the right side and immediately back to the size of the screen. watch the right side of the recording! (see [switching-resizes-gnome-nautilus.tar.xz] - this is bigger then 1920x1080!)

i hope i made some sense somehow.

custom settings:
Mouse Binding: Left button + WIN = Maximize Mode "Smart"
Window Geometry -> Maximization -> "Allow manipulation of maximized windows"

uname -a
Linux www 4.5.0-1-default #1 SMP PREEMPT Wed Mar 16 17:30:21 UTC 2016 (b2c9ae5) x86_64 x86_64 x86_64 GNU/Linux (openSuse)

efl
Version: 1.17.0-194.8

enlightenment
Version: 0.20.6-179.2
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Redwood XT [Radeon HD 5670/5690/5730] (prog-if 00 [VGA controller])
	Subsystem: PC Partner Limited / Sapphire Technology Device e166
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR+ <PERR- INTx-
	Latency: 0, Cache Line Size: 32 bytes
	Interrupt: pin A routed to IRQ 27
	Region 0: Memory at e0000000 (64-bit, prefetchable) [size=256M]
	Region 2: Memory at fc200000 (64-bit, non-prefetchable) [size=128K]
	Region 4: I/O ports at 2000 [size=256]
	[virtual] Expansion ROM at fc240000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: radeon
	Kernel modules: radeon
raster added a subscriber: raster.Jul 13 2016, 7:34 PM

this doesnt happen with normal pager?

raster removed a project: efl.Jul 13 2016, 7:34 PM

@raster never occured to me to try this. the default pager - which i don't like - seems to be much better at correcting this, but there seems to be an underlying issue.

the "jumping" happens, but it's harder to spot (program background must be contrast to desktop background eg black/white).

also the window geometry seems to change. see here: on the right first pager there is a white border visible - thats firefox. when i switch to the first vdesktop it's in the correct place and (left side of the image), it is also correctly displayed in the pager.

ProhtMeyhet added a comment.EditedSep 4 2016, 4:58 AM

@raster, @zmike for the "jumping": i ran xev on a tiled desktop and on each change of vdesktop on any screen it gets the following events. i dont know what they really mean, but there are Expose events with width and height arguments in there with very small sizes and eventually the size is set back to the original size with a ConfigureNotify event. does this help?

VisibilityNotify event, serial 41, synthetic NO, window 0x4000001,
    state VisibilityPartiallyObscured

ConfigureNotify event, serial 41, synthetic NO, window 0x4000001,
    event 0x4000001, window 0x4000001, (0,0), width 1212, height 986,
    border_width 0, above 0x0, override NO

VisibilityNotify event, serial 41, synthetic NO, window 0x4000001,
    state VisibilityUnobscured

Expose event, serial 41, synthetic NO, window 0x4000001,
    (0,0), width 1212, height 10, count 3

Expose event, serial 41, synthetic NO, window 0x4000001,
    (0,10), width 10, height 58, count 2

Expose event, serial 41, synthetic NO, window 0x4000001,
    (68,10), width 1144, height 58, count 1

Expose event, serial 41, synthetic NO, window 0x4000001,
    (0,68), width 1212, height 918, count 0

ConfigureNotify event, serial 41, synthetic YES, window 0x4000001,
    event 0x4000001, window 0x4000001, (1,1), width 1212, height 986,
    border_width 0, above 0x0, override NO

ConfigureNotify event, serial 41, synthetic NO, window 0x4000001,
    event 0x4000001, window 0x4000001, (0,0), width 1212, height 1022,
    border_width 0, above 0x0, override NO

Expose event, serial 41, synthetic NO, window 0x4000001,
    (0,0), width 1212, height 10, count 3

Expose event, serial 41, synthetic NO, window 0x4000001,
    (0,10), width 10, height 58, count 2

Expose event, serial 41, synthetic NO, window 0x4000001,
    (68,10), width 1144, height 58, count 1

Expose event, serial 41, synthetic NO, window 0x4000001,
    (0,68), width 1212, height 954, count 0

ConfigureNotify event, serial 41, synthetic YES, window 0x4000001,
    event 0x4000001, window 0x4000001, (1,1), width 1212, height 1022,
    border_width 0, above 0x0, override NO

well configurenotify is saying something moved it. the fact there is a synthetic one says the wm moved it as really only the wm would send such an event (a synthetic one).

i have never seen this issue. i really do not know what is going on. i can't reproduce it. :(

@raster can you suggest some breakpoints for gdb for this?

/src/modules/pager_plain/e_mod_main.c:_pager_desk_select ?

i guess if enlightenment sends these signals it would be through

evas_object_geometry_get /
evas_object_geometry_set
or
edje_object_signal_emit?

ProhtMeyhet added a comment.EditedOct 2 2016, 11:55 AM

@raster gdb breakpoint backtraces from 2 testcases: (note: the first backtrace is the short backtrace with bt, the second is the same backtrace with bt full)

first, 2 windows, one window (xev) on the left monitor in a tiled virtual desk (number 4), one on the right also on virtual desk 4 tiled.

i switched from the empty first virtual desk to the empty second virtual desk. xev doesn't report any changes and i don't see geometry change call for any window.

same thing with a window on first desktop on the screen where xev is running

#1  0x000000000045fa69 in e_client_res_change_geometry_restore (ec=ec@entry=0x38ab790) at src/bin/e_client.c:2969
        override = <optimized out>
        x = 0
        y = 36
        w = 1214
        h = 988
        pre_res_change = {valid = 1 '\001', x = 0, y = 36, w = 1214, h = 988, saved = {x = 0, y = 61, w = 802, h = 482}}
        __FUNCTION__ = "e_client_res_change_geometry_restore"

^^^ there's height 988, xev gets 986. 2 px border. what i don't get is where these values are from. since the function is called e_client_res_change_geometry_restore i guess there is a bug with my 3 screens which have different resolutions (1x 1920x1080, 2x 1280x1024).

what i've posted in irc:

i've got this problem: when i switch virtual desktops on any screen the geometry of windows in other virtual desktops change. using xev, i can see three ConfigureNotify. 2 with the same size (w:1212, h:1022), one with a much smaller height (w:1212, h:986). smaller is marked synthetic.

call signature via gdb: _e_client_move_resize (w=w@entry=1214, h=h@entry=1024) is matching to the correct value -2. so some other function i can't find calculates the actual w/h with the existing 1px border in mind.

short version of backtrace/xev: http://paste.opensuse.org/50809834

anyone got a hint where to look? what breakpoint could be helpful?

ProhtMeyhet added a comment.EditedOct 2 2016, 12:35 PM

ongoing... looks like i'll have to compile myself and go by trial and error.

this isn't meant as a slight or something, i just don't have the depth knowledge required to understand the code.

this code in src/bin/e_client.c#n3078 doesn't strike me as very useful. it saves the geometry and then immediately restores it? e_client_res_change_geometry_restore will call evas_object_geometry_set, which - as far as i understand - will produce a ConfigureNotify? is this to make sure the geometry is what e has stored in it's cache in case somehow the geometry was changed without notifying e? if so, this could be an explanation why there are 3 ConfigureNotify events.

E_API void
e_client_zone_set(E_Client *ec, E_Zone *zone)
{
(....)
   e_client_res_change_geometry_save(ec);
   e_client_res_change_geometry_restore(ec);
(....)
}

E_API void
e_client_desk_set(E_Client *ec, E_Desk *desk) {
(....)
 if (old_desk->zone == ec->zone)
          {
             e_client_res_change_geometry_save(ec);
             e_client_res_change_geometry_restore(ec);
             ec->pre_res_change.valid = 0;
          }
(....)
ProhtMeyhet added a comment.EditedOct 3 2016, 12:18 AM

after a good night sleep, and sorry if i'm bombarding. there is the other issue seen in

:

#1  0x000000000045fa69 in e_client_res_change_geometry_restore (ec=ec@entry=0x2286c50) at src/bin/e_client.c:2969
        override = <optimized out>
        x = 1280
        y = 0
        w = 0
        h = 1080
        pre_res_change = {valid = 1 '\001', x = 1280, y = 0, w = 0, h = 1080, saved = {x = 424, y = 498, w = 802, h = 482}}

notice the w width is 0 twice! that is what happend to this terminology window on screen 1 (1920x1080):

zmike added a comment.Oct 4 2016, 5:18 AM

Can you describe, in detail, the placements and configurations of your shelves?

2 shelfs per monitor.

left monitor: 1280x1024
shelf top:

  • contents: 1x Tasks
  • above everything
  • position: center top
  • size: 24px no shrink
  • style: invisible
  • no auto hide
  • show on specific desktops: 1-0, 9-0, 10-0, 11-0

shelf right:

  • contents: pager.3, start, titling 0, xkbswitch2
  • above everything
  • position: center right
  • size: 44px shrink
  • style: default
  • no auto hide
  • show on specific desktops: 0-0, 1-0, 2-0, 3-0, 4-0, 6-0, 7-0, 9-0, 10-0, 11-0

center monitor: 1920x1080
shelf top:

  • contents: 1x Tasks
  • above everything
  • position: center top
  • size: 24px no shrink
  • style: invisible
  • no auto hide
  • show on specific desktops: 1-0, 9-0, 10-0, 11-0

shelf left:

  • contents: pager.3, start, music-control.1, temperature.5, cpufreq.0, titling 0, xkbswitch2
  • above everything
  • position: center left
  • size: 52px shrink
  • style: default
  • no auto hide
  • show on specific desktops: 0-0, 1-0, 2-0, 3-0, 4-0, 6-0, 7-0, 9-0, 10-0, 11-0

right monitor: 1280x1024
shelf top:

  • contents: 1x Tasks, clock
  • above everything
  • position: center top
  • size: 28px no shrink
  • style: invisible
  • no auto hide
  • show on all desktops

shelf right:

  • contents: pager.3, start, xkbswitch2, mixer
  • above everything
  • position: center left
  • size: 44px shrink
  • style: default
  • no auto hide
  • show on specific desktops: 0-0, 1-0, 2-0, 3-0, 4-0, 6-0, 7-0, 8-0, 9-0, 10-0, 11-0

titling is set on every zone on 1-0, 2-0, 3-0, 4-0

as @zmike has properly guessed, it is related to having shelves on the left or right. i've installed e on my server that has a single screen on an onboard intel graphic card (4 series) and i see the same behavior with the default theme. if i remove the shelve on the side, it's not happening anymore. moreover i can trigger the following xev outputs by switching the shelf from top/bottom to left/right on any virtual desktop.

the height difference from 1078 to 1042 is again 36 pixel, i guess that was the original height of the default "shelf" or whatever was used before OR it is an icon height/width.

it gets more interesting when i add another shelf on the side (before 1 shelf right, then another shelf left). the shelf is created at the bottom and the ConfigureNotify height is first 982 (diff: 96) and then with another ConfigureNotify 1018 (diff: 60). if i move the shelf to the left, it gets the same values again. if i swich virtual desks, we are back at height 1042.

i'll have a look into if i can get the same behaviour in a nested X session or via qemu. if so, i'll try to get you a hopefully reproduceable os image.

VisibilityNotify event, serial 41, synthetic NO, window 0x1000001,
    state VisibilityPartiallyObscured

ConfigureNotify event, serial 41, synthetic NO, window 0x1000001,
    event 0x1000001, window 0x1000001, (0,0), width 1834, height 1042,
    border_width 0, above 0x0, override NO

VisibilityNotify event, serial 41, synthetic NO, window 0x1000001,
    state VisibilityUnobscured

Expose event, serial 41, synthetic NO, window 0x1000001,
    (0,0), width 1834, height 10, count 3

Expose event, serial 41, synthetic NO, window 0x1000001,
    (0,10), width 10, height 58, count 2

Expose event, serial 41, synthetic NO, window 0x1000001,
    (68,10), width 1766, height 58, count 1

Expose event, serial 41, synthetic NO, window 0x1000001,
    (0,68), width 1834, height 974, count 0

ConfigureNotify event, serial 41, synthetic YES, window 0x1000001,
    event 0x1000001, window 0x1000001, (1,1), width 1834, height 1042,
    border_width 0, above 0x0, override NO

ConfigureNotify event, serial 41, synthetic NO, window 0x1000001,
    event 0x1000001, window 0x1000001, (0,0), width 1834, height 1078,
    border_width 0, above 0x0, override NO

Expose event, serial 41, synthetic NO, window 0x1000001,
    (0,0), width 1834, height 10, count 3

Expose event, serial 41, synthetic NO, window 0x1000001,
    (0,10), width 10, height 58, count 2

Expose event, serial 41, synthetic NO, window 0x1000001,
    (68,10), width 1766, height 58, count 1

Expose event, serial 41, synthetic NO, window 0x1000001,
    (0,68), width 1834, height 1010, count 0

ConfigureNotify event, serial 41, synthetic YES, window 0x1000001,
    event 0x1000001, window 0x1000001, (1,1), width 1834, height 1078,
    border_width 0, above 0x0, override NO

creating a shelf at the bottom (there wasn't one at the bottom)

VisibilityNotify event, serial 80, synthetic NO, window 0x1000001,
    state VisibilityPartiallyObscured

ConfigureNotify event, serial 80, synthetic NO, window 0x1000001,
    event 0x1000001, window 0x1000001, (0,0), width 1834, height 982,
    border_width 0, above 0x0, override NO

VisibilityNotify event, serial 80, synthetic NO, window 0x1000001,
    state VisibilityUnobscured

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,0), width 1834, height 10, count 3

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,10), width 10, height 58, count 2

Expose event, serial 80, synthetic NO, window 0x1000001,
    (68,10), width 1766, height 58, count 1

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,68), width 1834, height 914, count 0

ConfigureNotify event, serial 80, synthetic YES, window 0x1000001,
    event 0x1000001, window 0x1000001, (1,1), width 1834, height 982,
    border_width 0, above 0x0, override NO

ConfigureNotify event, serial 80, synthetic NO, window 0x1000001,
    event 0x1000001, window 0x1000001, (0,0), width 1834, height 1018,
    border_width 0, above 0x0, override NO

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,0), width 1834, height 10, count 3

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,10), width 10, height 58, count 2

Expose event, serial 80, synthetic NO, window 0x1000001,
    (68,10), width 1766, height 58, count 1

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,68), width 1834, height 950, count 0

ConfigureNotify event, serial 80, synthetic YES, window 0x1000001,
    event 0x1000001, window 0x1000001, (1,1), width 1834, height 1018,
    border_width 0, above 0x0, override NO

moving the created shelf from bottom to left:

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,0), width 1834, height 10, count 3

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,10), width 10, height 58, count 2

Expose event, serial 80, synthetic NO, window 0x1000001,
    (68,10), width 1766, height 58, count 1

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,68), width 1834, height 950, count 0

ConfigureNotify event, serial 80, synthetic YES, window 0x1000001,
    event 0x1000001, window 0x1000001, (1,1), width 1834, height 1018,
    border_width 0, above 0x0, override NO

VisibilityNotify event, serial 80, synthetic NO, window 0x1000001,
    state VisibilityPartiallyObscured

ConfigureNotify event, serial 80, synthetic NO, window 0x1000001,
    event 0x1000001, window 0x1000001, (0,0), width 1774, height 1018,
    border_width 0, above 0x0, override NO

VisibilityNotify event, serial 80, synthetic NO, window 0x1000001,
    state VisibilityUnobscured

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,0), width 1774, height 10, count 3

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,10), width 10, height 58, count 2

Expose event, serial 80, synthetic NO, window 0x1000001,
    (68,10), width 1706, height 58, count 1

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,68), width 1774, height 950, count 0

ConfigureNotify event, serial 80, synthetic YES, window 0x1000001,
    event 0x1000001, window 0x1000001, (1,1), width 1774, height 1018,
    border_width 0, above 0x0, override NO

ConfigureNotify event, serial 80, synthetic NO, window 0x1000001,
    event 0x1000001, window 0x1000001, (0,0), width 1774, height 1078,
    border_width 0, above 0x0, override NO

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,0), width 1774, height 10, count 3

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,10), width 10, height 58, count 2

Expose event, serial 80, synthetic NO, window 0x1000001,
    (68,10), width 1706, height 58, count 1

Expose event, serial 80, synthetic NO, window 0x1000001,
    (0,68), width 1774, height 1010, count 0

ConfigureNotify event, serial 80, synthetic YES, window 0x1000001,
    event 0x1000001, window 0x1000001, (61,1), width 1774, height 1078,
    border_width 0, above 0x0, override NO

i forgot: you must have a shelf on top (bottom might work too) and additionally another shelf on left or right. so its more a mixup bug.

zmike closed this task as Resolved.Aug 22 2017, 11:46 AM

I think this should be resolved, either in the latest stable release or in git. If not in stable then the changes required were too big to backport.