! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Window position and state not correctly remembered
Status:
RESOLVED: FIXED
Product:
Mousepad
Component:
General

Comments

Description trondsg 2007-02-24 10:41:38 CET
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20070126 Ubuntu/dapper-security Epiphany/2.14 Firefox/1.5.0.9
Build Identifier: 

The window state and position is not correctly remembered. If the window is maximized, the position and size as maximized is remembered. Position and state should be separate, and the remembered position should only be updated if the window is not maximized nor minimized.



Reproducible: Always

Steps to Reproduce:
1. Open mousepad with the window restored. Resize it as you like it
2. Maximize the mousepad window
3. Close the mousepad window
4. Start mousepad again
5. Restore the window

Actual Results:  
When the window is restored it still covers the entire screen

Expected Results:  
The window position after it's restored should be the same as it was before it was maximized (at step 1).
Comment 1 rff1917 2009-10-16 11:03:20 CEST
Can something similar to http://bugzilla.xfce.org/show_bug.cgi?id=4697#c15 be done here?
Comment 2 Julien [nodiscc] editbugs 2012-11-23 13:16:18 CET
Confirming this bug is still present in mousepad 0.2.16-6 in Debian wheezy.
Comment 3 Andre Miranda editbugs 2013-10-14 06:07:44 CEST
Here Mousepad 0.3.0 can "remember" the window size but not position or state(maximized or not).
I'll give it try to make a patch soon.
Comment 4 Matthew Brush editbugs 2013-10-26 05:23:05 CEST
As long as it doesn't show up off-screen when the user unplugs a monitor :)
Comment 5 Andre Miranda editbugs 2013-10-27 02:26:00 CET
(In reply to Matthew Brush from comment #4)
> As long as it doesn't show up off-screen when the user unplugs a monitor :)

Now that you mentioned the word 'monitor', I wonder how to handle multiple monitors correctly... for example, in which monitor the window was and what if the windows is between two displays?
I can't test this :/
Comment 6 Matthew Brush editbugs 2014-07-13 05:18:42 CEST
I implemented this (rather naively) in http://git.xfce.org/apps/mousepad/commit/?id=ea2b28e09dd8477af5a5a238c58bf42944a6f8a4.
Comment 7 Andre Miranda editbugs 2014-07-15 02:37:08 CEST
I've just grabbed the latest from master(58adbe7) for testing.
The window size is restored as before, now the state(maximized or fullscreen) is also restored, but the window position is not :(
Taking a look at dconf, the left and top prefs are stuck with "-1".

System specs:
Archlinux 64 updated
Dual monitor(1920x1080 + 1440x900)
Xfwm4 or Kwin
Comment 8 Matthew Brush editbugs 2014-07-15 02:45:38 CEST
Just to be sure, did you enable 'Remember window position' checkbox in the preferences dialog? I left it off by default to retain existing behaviour.
Comment 9 Andre Miranda editbugs 2014-07-15 02:50:12 CEST
No, I didn't ^^
Now it works almost nicely :)
I've just notice that if I change something(position, state or size) and close mousepad quickly, the preference won't be updated, it has a 2 sec delay to save. Is this intentional?
Comment 10 Matthew Brush editbugs 2014-07-15 03:12:30 CEST
Yeah, there's an existing 1-2 second g_timeout_add() in there to buffer rapid changes (I think). It could be done differently to make it faster without stacking up, but some mechanism is probably useful since GDK configure events can come in really fast (eg. when dragging/resizing the window).

Bug #2945

Reported by:
trondsg
Reported on: 2007-02-24
Last modified on: 2014-07-15

People

Assignee:
Matthew Brush
CC List:
6 users

Version

Target Milestone:
Mousepad 0.4.x

Attachments

Additional information