Page 1 of 1

Linux: Export window's position & size and not saved

Posted: Sat Oct 08, 2016 8:52 pm
by pangwolin
Whenever I use the Export feature, its dialog popup floating window is placed always at the same position and with the same size all the time.

After I move the floating window around a bit and resize it, these values are never saved properly.
After closing this floating window and clicking Export again, the window position and size are reset to the same default value.
Couldn't find a way to edit this in xnview.ini. Is this the "geometry" value?

Below is the output from terminal from when I use Export. The steps I did were:

Code: Select all

xnview
use export (browser and viewer mode yield the same issue)
resize and change position
esc
quit
QSettings::endGroup: No matching beginGroup()
QObject::connect: Cannot connect (null)::settingsChanged() to DlgExport::onRefresh()
#### 236f360 : 364
### resetViewport (2369f20) ==> 100 30 (70 30) 0 0
### MyBitmapView (2369f20) :: resizeEvent 607 651
#### 236f360 : 3161
### resetViewport (2369f20) ==> 607 651 (607 258) 0 0
### MyBitmapView (236f360) :: resizeEvent 606 652
## Bitmap :: load 0
###### LOAD BITMAP </tmp/xnview_J23017.jpg>
BITAMP VIEW 1 1920 817 606 258 31,610001 31,578945
### resetViewport (236f360) ==> 606 652 (606 258) 0 0
### MyBitmapView (236f360) :: resizeEvent 606 651
BITAMP VIEW 1 1920 817 606 258 31,610001 31,578945
### resetViewport (236f360) ==> 606 651 (606 258) 0 0
### MyBitmapView (2369f20) :: resizeEvent 605 650
#### 236f360 : 3151
BITAMP VIEW 1 1920 817 604 257 31,510000 31,456549
### resetViewport (236f360) ==> 606 651 (604 257) 0 0
### resetViewport (2369f20) ==> 605 650 (605 257) 0 0
### MyBitmapView (236f360) :: resizeEvent 604 650
BITAMP VIEW 1 1920 817 604 257 31,510000 31,456549
### resetViewport (236f360) ==> 604 650 (604 257) 0 0
### MyBitmapView (2369f20) :: resizeEvent 589 642
#### 236f360 : 3067
BITAMP VIEW 1 1920 817 588 250 30,670000 30,599754
### resetViewport (236f360) ==> 604 650 (588 250) 0 0
### resetViewport (2369f20) ==> 589 642 (589 250) 0 0
### MyBitmapView (236f360) :: resizeEvent 588 642
BITAMP VIEW 1 1920 817 588 250 30,670000 30,599754
### resetViewport (236f360) ==> 588 642 (588 250) 0 0
### MyBitmapView (2369f20) :: resizeEvent 573 633
#### 236f360 : 2984 ### resetViewport (236f360) ==> 516 649 (516 219) 0 0
QSettings::endGroup: No matching beginGroup()
QObject::connect: Cannot connect (null)::settingsChanged() to DlgExport::onRefresh()
#### 2086580 : 364
### resetViewport (259c330) ==> 100 30 (70 30) 0 0
### MyBitmapView (259c330) :: resizeEvent 607 651
#### 2086580 : 3161
### resetViewport (259c330) ==> 607 651 (607 258) 0 0
### MyBitmapView (2086580) :: resizeEvent 606 652
## Bitmap :: load 0
###### LOAD BITMAP </tmp/xnview_T23017.jpg>
BITAMP VIEW 1 1920 817 606 258 31,610001 31,578945
### resetViewport (2086580) ==> 606 652 (606 258) 0 0
### MyBitmapView (2086580) :: resizeEvent 606 651
BITAMP VIEW 1 1920 817 606 258 31,610001 31,578945
### resetViewport (2086580) ==> 606 651 (606 258) 0 0
MyBitmapView :: mousePressEvent
setCurrentFilename </home/user/Pictures/wallpapers/GITS_SITE_1920_AT_01.jpg>
######### CategoryModel :: checkAndSave()
######### CategoryModel :: checkAndSave()
BrowserWindow :: changeVisibility()
BrowserWindow :: updateMenu()
BrowserWindow :: changeVisibility()
BrowserWindow :: updateMenu()
BrowserWindow :: updateMenu()
######### CategoryModel :: checkAndSave()
SAVE : 1280 978
BrowserWindow :: saveState => 1280 978
=> 843 907
## BaseViewWindow :: ~BaseViewWindow()
ThumbLoaderThread :: stop()
### ThumbLoaderThread :: stop() ok
ThumbLoaderThread :: stop()
### ThumbLoaderThread :: stop() ok
######ThumbLoaderThread :: run : 2224930 OK
QMutex: destroying locked mutex
## BaseViewWindow :: ~BaseViewWindow() ok
AbstractViewWindow :: ~AbstractViewWindow()
BitmapLoadThread :: stop()
ThumbLoaderThread :: stop()
### ThumbLoaderThread :: stop() ok
ThumbLoaderThread :: stop()
### ThumbLoaderThread :: stop() ok
######ThumbLoaderThread :: run : 1d0bf60 OK
QMutex: destroying locked mutex
AFTER WAIT
BitmapLoadThread :: stop()
I edited out some resizing operations since they are redundant.
The lines that striked me are the following, which are printed when I kill the window
QSettings::endGroup: No matching beginGroup()
QObject::connect: Cannot connect (null)::settingsChanged() to DlgExport::onRefresh()
I hope to be pointing at the right thing.
Other floating windows have their size and position properly saved.
SPECS: Linux Mint 17.3 using i3 window manager (doubt it really matters)

Re: [Linux] Export window's position & size and not saved

Posted: Sat Oct 08, 2016 9:50 pm
by pangwolin
I found a possible workaround thanks for the awesome i3 window manager (i3wm). In the i3 config file:
for_window [title="Export"] move absolute position 0 px 0 px, resize set 700 700
This will effectively position it at position 0,0 and not 80,20 as it seems to be the default value in XnView.

For reference, here is what xprop gave me for the Export window:

Code: Select all

WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_USER_TIME(CARDINAL) = 168175795
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MODAL
WM_TRANSIENT_FOR(WINDOW): window id # 0x1200004

XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = "Export"
_NET_WM_NAME(UTF8_STRING) = "Export"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x7, 0x26, 0x1e, 0x3, 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG, _NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x1200005
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: True
                Initial state is Normal State.
_NET_WM_PID(CARDINAL) = 29451
WM_CLASS(STRING) = "XnView", "XnViewMP"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_CONTEXT_HELP
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: 80, 20
                user specified size: 1280 by 971
                program specified minimum size: 614 by 342
                window gravity: Static
See the "user specified location" and "size". Yeah.

Re: [Linux] Export window's position & size and not saved

Posted: Mon Oct 10, 2016 1:15 pm
by xnview
on my Ubuntu, i can't reproduce this problem

Re: [Linux] Export window's position & size and not saved

Posted: Mon Oct 10, 2016 7:12 pm
by pangwolin
Do you mean you don't get these errors at all on your side? I'm running a Ubuntu 14.04.1 based distro.

I tried with KDE and XFCE, the window is positioned "properly" at 0,0 by default, but it definitely doesn't retain size and position after closing it (it's always reset).
Only in i3wm did I have the window positioned slightly offset from 0,0 (which led me to think 80,20 was the coordinates, but I'm not really sure as I have not measured).

Either way, the workaround works for me to fix this issue in i3, so no need to worry about this "bug" that much.
Keep up the good work. :)