[gnome-panel/wip-warnings: 7/21] multiscreen: reformat code
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip-warnings: 7/21] multiscreen: reformat code
- Date: Tue, 25 Feb 2020 15:04:42 +0000 (UTC)
commit 08bf1318dc35b0fdc3e3f62bf783c1d76fb00baa
Author: Sebastian Geiger <sbastig gmx net>
Date: Tue Feb 25 10:48:02 2020 +0100
multiscreen: reformat code
gnome-panel/panel-multiscreen.c | 72 ++++++++++++++++++++++-------------------
1 file changed, 38 insertions(+), 34 deletions(-)
---
diff --git a/gnome-panel/panel-multiscreen.c b/gnome-panel/panel-multiscreen.c
index 97f4980ca..0537c09a7 100644
--- a/gnome-panel/panel-multiscreen.c
+++ b/gnome-panel/panel-multiscreen.c
@@ -45,43 +45,47 @@ static void panel_multiscreen_queue_reinit (void);
static gboolean
_panel_multiscreen_output_should_be_first (Display *xdisplay,
- RROutput output,
- XRROutputInfo *info,
- RROutput primary)
+ RROutput output,
+ XRROutputInfo *info,
+ RROutput primary)
{
- if (primary)
- return output == primary;
+ if (primary)
+ return output == primary;
- if (have_randr_1_3) {
- Atom connector_type_atom;
- Atom actual_type;
- int actual_format;
- unsigned long nitems;
- unsigned long bytes_after;
- unsigned char *prop;
- char *connector_type;
- gboolean retval;
-
- connector_type_atom = XInternAtom (xdisplay, "ConnectorType", False);
-
- if (XRRGetOutputProperty (xdisplay, output, connector_type_atom,
- 0, 100, False, False, None,
- &actual_type, &actual_format,
- &nitems, &bytes_after, &prop) == Success) {
- if (actual_type == XA_ATOM && nitems == 1 && actual_format == 32) {
- connector_type = XGetAtomName (xdisplay, prop[0]);
- retval = g_strcmp0 (connector_type, "Panel") == 0;
- XFree (connector_type);
- return retval;
- }
- }
- }
+ if (have_randr_1_3)
+ {
+ Atom connector_type_atom;
+ Atom actual_type;
+ int actual_format;
+ unsigned long nitems;
+ unsigned long bytes_after;
+ unsigned char *prop;
+ char *connector_type;
+ gboolean retval;
+
+ connector_type_atom = XInternAtom (xdisplay, "ConnectorType", False);
+
+ if (XRRGetOutputProperty (xdisplay, output, connector_type_atom,
+ 0, 100, False, False, None,
+ &actual_type, &actual_format,
+ &nitems, &bytes_after, &prop) == Success)
+ {
+ if (actual_type == XA_ATOM && nitems == 1 && actual_format == 32)
+ {
+ connector_type = XGetAtomName (xdisplay, prop[0]);
+ retval = g_strcmp0 (connector_type, "Panel") == 0;
+ XFree (connector_type);
+
+ return retval;
+ }
+ }
+ }
- /* Pre-1.3 fallback:
- * "LVDS" is the oh-so-intuitive name that X gives to laptop LCDs.
- * It can actually be LVDS0, LVDS-0, Lvds, etc.
- */
- return (g_ascii_strncasecmp (info->name, "LVDS", strlen ("LVDS")) == 0);
+ /* Pre-1.3 fallback:
+ * "LVDS" is the oh-so-intuitive name that X gives to laptop LCDs.
+ * It can actually be LVDS0, LVDS-0, Lvds, etc.
+ */
+ return (g_ascii_strncasecmp (info->name, "LVDS", strlen ("LVDS")) == 0);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]