Re: [Development] QWidget::setWindowState(Qt::WindowStates) vs QWindow::setWindowState(Qt::WindowState)

2017-01-19 Thread Thomas Søndergaard
Hi Bo

On Thu, 19 Jan 2017 at 09.25, Bo Thorsen  wrote:

> Hej Thomas
>

> [...]


> You ask for the best way to proceed: As usual with issues like this, you
>
> should enter a bug in the bug tracker.
>
I did, QTBUG-57882. See original post.

Thomas
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] QWidget::setWindowState(Qt::WindowStates) vs QWindow::setWindowState(Qt::WindowState)

2017-01-19 Thread Bo Thorsen

Hej Thomas,

Please don't take silence as some indication that people are offended. I 
just think you found a corner case that no one has considered and do not 
consider one way or the other.


You ask for the best way to proceed: As usual with issues like this, you 
should enter a bug in the bug tracker.


Bo Thorsen.

Den 18-01-2017 kl. 16:21 skrev Thomas Søndergaard:

I hope my previous email wasn't offensive or downright stupid; no one
has replied. I certainly meant no disrespect. While I'm waiting for a
response, let me throw a specific proposal out there.

First, I assume the correct solution is to extend QWindow and
QPlatformWindow so they can deal with compound states such as
Qt::WindowMaximized|Qt::WindowMinimized, just like QWidget can. Since
QWindow::setWindowState(Qt::WindowState) and Qt::WindowState
QWindow::windowState() cannot be modified, I'm thinking of adding

Qt::WindowStates QWindow::fullWindowState() const;
void QWindow::setFullWindowState(Qt::WindowStates);

and

Qt::WindowStates QPlatformWindow::fullWindowState() const;
void QPlatformWindow::setFullWindowState(Qt::WindowStates);

The existing QWindow::windowState() would then be implemented using the
effectiveState() function from qwidget.cpp (I'd move it over)

I can experiment with these changes and implementing them in the xcb and
windows platform plugins, but early feedback is always great, so I avoid
wasting time.

Thanks for making Qt

Thomas




On 17 January 2017 at 21:37, Thomas Søndergaard
> wrote:

Hi,

I'm looking at the Qt code with intention to fix it so this code

QWidget widget;
widget.setWindowState(Qt::WindowMaximized);
widget.showMinized();

will show the window iconified and when the user (or program)
unminimize the window it pops up maximized. This is currently not
possible (QTBUG-57882 ).

I've been trying to read the Qt code and it seems to me the problem
is that QWindow::setWindowState(Qt::WindowState) and
QPlatformWindow::setWindowState(Qt::WindowState) only take a
Qt::WindowState argument not a Qt::WindowStates argument. This seems
to make it impossible to set the correct state on the windows-system
window.

Is this intentional or a known issue?

I would be happy to get suggestions for how this is best fixed.



Bo Thorsen,
Director, Viking Software.

--
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] QWidget::setWindowState(Qt::WindowStates) vs QWindow::setWindowState(Qt::WindowState)

2017-01-18 Thread Giuseppe D'Angelo
On Wed, Jan 18, 2017 at 4:21 PM, Thomas Søndergaard
 wrote:
> I hope my previous email wasn't offensive or downright stupid; no one has
> replied. I certainly meant no disrespect. While I'm waiting for a response,
> let me throw a specific proposal out there.


FWIW I've received *both* emails right now. Email server hiccup?

-- 
Giuseppe D'Angelo
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] QWidget::setWindowState(Qt::WindowStates) vs QWindow::setWindowState(Qt::WindowState)

2017-01-18 Thread Thomas Søndergaard
I hope my previous email wasn't offensive or downright stupid; no one has
replied. I certainly meant no disrespect. While I'm waiting for a response,
let me throw a specific proposal out there.

First, I assume the correct solution is to extend QWindow and
QPlatformWindow so they can deal with compound states such as
Qt::WindowMaximized|Qt::WindowMinimized, just like QWidget can. Since
QWindow::setWindowState(Qt::WindowState) and Qt::WindowState
QWindow::windowState() cannot be modified, I'm thinking of adding

Qt::WindowStates QWindow::fullWindowState() const;
void QWindow::setFullWindowState(Qt::WindowStates);

and

Qt::WindowStates QPlatformWindow::fullWindowState() const;
void QPlatformWindow::setFullWindowState(Qt::WindowStates);

The existing QWindow::windowState() would then be implemented using the
effectiveState() function from qwidget.cpp (I'd move it over)

I can experiment with these changes and implementing them in the xcb and
windows platform plugins, but early feedback is always great, so I avoid
wasting time.

Thanks for making Qt

Thomas




On 17 January 2017 at 21:37, Thomas Søndergaard <
thomas.sonderga...@karoshealth.com> wrote:

> Hi,
>
> I'm looking at the Qt code with intention to fix it so this code
>
> QWidget widget;
> widget.setWindowState(Qt::WindowMaximized);
> widget.showMinized();
>
> will show the window iconified and when the user (or program) unminimize
> the window it pops up maximized. This is currently not possible (
> QTBUG-57882 ).
>
> I've been trying to read the Qt code and it seems to me the problem is
> that QWindow::setWindowState(Qt::WindowState) and QPlatformWindow::
> setWindowState(Qt::WindowState) only take a Qt::WindowState argument not
> a Qt::WindowStates argument. This seems to make it impossible to set the
> correct state on the windows-system window.
>
> Is this intentional or a known issue?
>
> I would be happy to get suggestions for how this is best fixed.
>
> Best regards,
> Thomas
>



-- 

Thomas Sondergaard | karoshealth

Product Architect


M: +45 5157 3090 | Skype: tsondergaard


Krumtappen 4, 3rd floor

DK-2500 Valby, Denmark
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] QWidget::setWindowState(Qt::WindowStates) vs QWindow::setWindowState(Qt::WindowState)

2017-01-17 Thread Thomas Søndergaard
Hi,

I'm looking at the Qt code with intention to fix it so this code

QWidget widget;
widget.setWindowState(Qt::WindowMaximized);
widget.showMinized();

will show the window iconified and when the user (or program) unminimize
the window it pops up maximized. This is currently not possible (QTBUG-57882
).

I've been trying to read the Qt code and it seems to me the problem is that
QWindow::setWindowState(Qt::WindowState) and
QPlatformWindow::setWindowState(Qt::WindowState) only take a
Qt::WindowState argument not a Qt::WindowStates argument. This seems to
make it impossible to set the correct state on the windows-system window.

Is this intentional or a known issue?

I would be happy to get suggestions for how this is best fixed.

Best regards,
Thomas
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development