parkouss / pyewmh

An implementation of EWMH (Extended Window Manager Hints) for python, based on Xlib.
GNU Lesser General Public License v3.0
40 stars 15 forks source link

Error at getWmWindowTypes #9

Closed cpdef closed 8 years ago

cpdef commented 8 years ago

I think i found an bug at the getWmWindowTypes function: `def getWmWindowType(self, win, str=False): """Get the list of window types of the given window (property _NET_WM_WINDOW_TYPE).

    :param win: the window object
    :param str: True to get a list of string types instead of int
    :return: list of (int|str)"""
    types = self._getProperty('_NET_WM_WINDOW_TYPE', win)
    if not str: return types
    return map(self._getAtomName, wtypes)`

types at line 7 must be wtypes or wtypes at last line types. or not?

parkouss commented 8 years ago

I assume you are talking about the same fix reported in #7, and looks like there is a fix in #8. @rrthomas, I missed the bug report, sorry for that.

I'll give this a test, and will merge/release as soon as I find the time. Thanks!

cpdef commented 8 years ago

I thinked it was an other bug, i read wrong.

cpdef commented 8 years ago

Am 11.05.2016 um 21:06 schrieb Julien Pagès:

I assume you are talking about the same fix reported in #7 https://github.com/parkouss/pyewmh/issues/7, and looks like there is a fix in #8 https://github.com/parkouss/pyewmh/pull/8. @rrthomas https://github.com/rrthomas, I missed the bug report, sorry for that.

I'll give this a test, and will merge/release as soon as I find the time. Thanks!

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/parkouss/pyewmh/issues/9#issuecomment-218558344

I have read wrong, i thinked it was an other method. sorry. But one Question: can u say me how to minimize a Window with emwh? i tryed this: [code] from ewmh import EWMH EWMH = EWMH() win = EWMH.getActiveWindow() EWMH.setWmState(win, 2, '_NET_WM_STATE_HIDDEN') EWMH.display.flush() [/code] i know about a function XIconifyWindow in c and Xlib but i cant have access to this function via python. Or is there some other function?

greetings Julian

parkouss commented 8 years ago

I just merged #8, so the first issue here will be solved soon. I will make a bugfix release.

For the other point, @cpdef, I believe this is not possible for every desktop manager unfortunately (see the second paragraph below)

See: https://specifications.freedesktop.org/wm-spec/1.3/ar01s05.html

_NET_WM_STATE_HIDDEN should be set by the Window Manager to
indicate that a window would not be visible on the screen if its
desktop/viewport were active and its coordinates were within the
screen bounds. The canonical example is that minimized windows
should be in the _NET_WM_STATE_HIDDEN state. Pagers and similar
applications should use _NET_WM_STATE_HIDDEN instead of WM_STATE
to decide whether to display a window in miniature representations
of the windows on a desktop.

Implementation note: if an Application asks to toggle
_NET_WM_STATE_HIDDEN the Window Manager should probably just
ignore the request, since _NET_WM_STATE_HIDDEN is a function of
some other aspect of the window such as minimization, rather than
an independent state.

Though, possibly for gnome: http://crunchbang.org/forums/viewtopic.php?id=28195