[libwnck/wip/muktupavels/prepare-for-wnck-handle: 7/8] xutils: change _wnck_change_state screen parameter type
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck/wip/muktupavels/prepare-for-wnck-handle: 7/8] xutils: change _wnck_change_state screen parameter type
- Date: Tue, 20 Aug 2019 19:17:53 +0000 (UTC)
commit c796f706c155ec8da6f701980ddb8d8a3669c8cb
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Tue Aug 20 21:55:21 2019 +0300
xutils: change _wnck_change_state screen parameter type
libwnck/window.c | 87 +++++++++++++++++++++++++++++---------------------------
libwnck/xutils.c | 20 +++++++------
libwnck/xutils.h | 10 +++----
3 files changed, 61 insertions(+), 56 deletions(-)
---
diff --git a/libwnck/window.c b/libwnck/window.c
index 235e3f9..5f25e3f 100644
--- a/libwnck/window.c
+++ b/libwnck/window.c
@@ -1341,11 +1341,12 @@ wnck_window_is_skip_pager (WnckWindow *window)
**/
void
wnck_window_set_skip_pager (WnckWindow *window,
- gboolean skip)
+ gboolean skip)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
skip,
_wnck_atom_get ("_NET_WM_STATE_SKIP_PAGER"),
0);
@@ -1397,11 +1398,12 @@ wnck_window_is_fullscreen (WnckWindow *window)
**/
void
wnck_window_set_skip_tasklist (WnckWindow *window,
- gboolean skip)
+ gboolean skip)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
skip,
_wnck_atom_get ("_NET_WM_STATE_SKIP_TASKBAR"),
0);
@@ -1419,11 +1421,12 @@ wnck_window_set_skip_tasklist (WnckWindow *window,
**/
void
wnck_window_set_fullscreen (WnckWindow *window,
- gboolean fullscreen)
+ gboolean fullscreen)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
fullscreen,
_wnck_atom_get ("_NET_WM_STATE_FULLSCREEN"),
0);
@@ -1514,12 +1517,12 @@ wnck_window_unminimize (WnckWindow *window,
* Asks the window manager to maximize @window.
**/
void
-wnck_window_maximize (WnckWindow *window)
+wnck_window_maximize (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
TRUE,
_wnck_atom_get ("_NET_WM_STATE_MAXIMIZED_VERT"),
_wnck_atom_get ("_NET_WM_STATE_MAXIMIZED_HORZ"));
@@ -1532,12 +1535,12 @@ wnck_window_maximize (WnckWindow *window)
* Asks the window manager to unmaximize @window.
**/
void
-wnck_window_unmaximize (WnckWindow *window)
+wnck_window_unmaximize (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
FALSE,
_wnck_atom_get ("_NET_WM_STATE_MAXIMIZED_VERT"),
_wnck_atom_get ("_NET_WM_STATE_MAXIMIZED_HORZ"));
@@ -1550,12 +1553,12 @@ wnck_window_unmaximize (WnckWindow *window)
* Asks the window manager to maximize horizontally @window.
**/
void
-wnck_window_maximize_horizontally (WnckWindow *window)
+wnck_window_maximize_horizontally (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
TRUE,
_wnck_atom_get ("_NET_WM_STATE_MAXIMIZED_HORZ"),
0);
@@ -1572,8 +1575,8 @@ wnck_window_unmaximize_horizontally (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
FALSE,
_wnck_atom_get ("_NET_WM_STATE_MAXIMIZED_HORZ"),
0);
@@ -1586,12 +1589,12 @@ wnck_window_unmaximize_horizontally (WnckWindow *window)
* Asks the window manager to maximize vertically @window.
**/
void
-wnck_window_maximize_vertically (WnckWindow *window)
+wnck_window_maximize_vertically (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
TRUE,
_wnck_atom_get ("_NET_WM_STATE_MAXIMIZED_VERT"),
0);
@@ -1604,12 +1607,12 @@ wnck_window_maximize_vertically (WnckWindow *window)
* Asks the window manager to unmaximize vertically @window.
**/
void
-wnck_window_unmaximize_vertically (WnckWindow *window)
+wnck_window_unmaximize_vertically (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
FALSE,
_wnck_atom_get ("_NET_WM_STATE_MAXIMIZED_VERT"),
0);
@@ -1622,12 +1625,12 @@ wnck_window_unmaximize_vertically (WnckWindow *window)
* Asks the window manager to shade @window.
**/
void
-wnck_window_shade (WnckWindow *window)
+wnck_window_shade (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
TRUE,
_wnck_atom_get ("_NET_WM_STATE_SHADED"),
0);
@@ -1640,12 +1643,12 @@ wnck_window_shade (WnckWindow *window)
* Asks the window manager to unshade @window.
**/
void
-wnck_window_unshade (WnckWindow *window)
+wnck_window_unshade (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
FALSE,
_wnck_atom_get ("_NET_WM_STATE_SHADED"),
0);
@@ -1666,7 +1669,7 @@ wnck_window_make_above (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
+ _wnck_change_state (window->priv->screen,
window->priv->xwindow,
TRUE,
_wnck_atom_get ("_NET_WM_STATE_ABOVE"),
@@ -1687,7 +1690,7 @@ wnck_window_unmake_above (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
+ _wnck_change_state (window->priv->screen,
window->priv->xwindow,
FALSE,
_wnck_atom_get ("_NET_WM_STATE_ABOVE"),
@@ -1707,7 +1710,7 @@ wnck_window_make_below (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
+ _wnck_change_state (window->priv->screen,
window->priv->xwindow,
TRUE,
_wnck_atom_get ("_NET_WM_STATE_BELOW"),
@@ -1728,7 +1731,7 @@ wnck_window_unmake_below (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
+ _wnck_change_state (window->priv->screen,
window->priv->xwindow,
FALSE,
_wnck_atom_get ("_NET_WM_STATE_BELOW"),
@@ -1743,12 +1746,12 @@ wnck_window_unmake_below (WnckWindow *window)
* screen, even when the workspace or viewport scrolls.
**/
void
-wnck_window_stick (WnckWindow *window)
+wnck_window_stick (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
TRUE,
_wnck_atom_get ("_NET_WM_STATE_STICKY"),
0);
@@ -1762,12 +1765,12 @@ wnck_window_stick (WnckWindow *window)
* screen when the workspace or viewport scrolls.
**/
void
-wnck_window_unstick (WnckWindow *window)
+wnck_window_unstick (WnckWindow *window)
{
g_return_if_fail (WNCK_IS_WINDOW (window));
- _wnck_change_state (WNCK_SCREEN_XSCREEN (window->priv->screen),
- window->priv->xwindow,
+ _wnck_change_state (window->priv->screen,
+ window->priv->xwindow,
FALSE,
_wnck_atom_get ("_NET_WM_STATE_STICKY"),
0);
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 6a42a51..89ed697 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -998,22 +998,24 @@ _wnck_keyboard_size (WnckScreen *screen,
}
void
-_wnck_change_state (Screen *screen,
- Window xwindow,
- gboolean add,
- Atom state1,
- Atom state2)
+_wnck_change_state (WnckScreen *screen,
+ Window xwindow,
+ gboolean add,
+ Atom state1,
+ Atom state2)
{
+ Screen *xscreen;
Display *display;
- Window root;
- XEvent xev;
+ Window root;
+ XEvent xev;
#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
#define _NET_WM_STATE_ADD 1 /* add/set property */
#define _NET_WM_STATE_TOGGLE 2 /* toggle property */
- display = DisplayOfScreen (screen);
- root = RootWindowOfScreen (screen);
+ xscreen = _wnck_screen_get_xscreen (screen);
+ display = DisplayOfScreen (xscreen);
+ root = RootWindowOfScreen (xscreen);
xev.xclient.type = ClientMessage;
xev.xclient.serial = 0;
diff --git a/libwnck/xutils.h b/libwnck/xutils.h
index 76a402f..9d63996 100644
--- a/libwnck/xutils.h
+++ b/libwnck/xutils.h
@@ -103,11 +103,11 @@ void _wnck_close (Screen *screen,
Window xwindow,
Time timestamp);
-void _wnck_change_state (Screen *screen,
- Window xwindow,
- gboolean add,
- Atom state1,
- Atom state2);
+void _wnck_change_state (WnckScreen *screen,
+ Window xwindow,
+ gboolean add,
+ Atom state1,
+ Atom state2);
void _wnck_change_workspace (WnckScreen *screen,
Window xwindow,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]