Commit 5427a4aa65b869706043d995db0c56629140088b
1 parent
0ce9ec40
Exists in
master
and in
1 other branch
Fixing getscreen width, height and length methods.
Showing
4 changed files
with
13 additions
and
10 deletions
Show diff stats
client/src/core/linux/request.cc
| ... | ... | @@ -150,19 +150,19 @@ |
| 150 | 150 | return *this; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | - static int getUIntValue(DBusMessageIter &iter) { | |
| 153 | + static unsigned int getUIntValue(DBusMessageIter &iter) { | |
| 154 | 154 | |
| 155 | 155 | if(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_UINT32) { |
| 156 | 156 | |
| 157 | 157 | dbus_uint32_t rc = 0; |
| 158 | 158 | dbus_message_iter_get_basic(&iter, &rc); |
| 159 | - return (int) rc; | |
| 159 | + return (unsigned int) rc; | |
| 160 | 160 | |
| 161 | 161 | } else if(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_UINT16) { |
| 162 | 162 | |
| 163 | 163 | dbus_uint16_t rc = 0; |
| 164 | 164 | dbus_message_iter_get_basic(&iter, &rc); |
| 165 | - return (int) rc; | |
| 165 | + return (unsigned int) rc; | |
| 166 | 166 | |
| 167 | 167 | } else if(dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_VARIANT) { |
| 168 | 168 | |
| ... | ... | @@ -177,14 +177,15 @@ |
| 177 | 177 | |
| 178 | 178 | dbus_uint32_t rc = 0; |
| 179 | 179 | dbus_message_iter_get_basic(&sub, &rc); |
| 180 | - return (int) rc; | |
| 180 | + return (unsigned int) rc; | |
| 181 | 181 | |
| 182 | 182 | } else if (current_type == DBUS_TYPE_UINT16) { |
| 183 | 183 | dbus_uint16_t rc = 0; |
| 184 | 184 | dbus_message_iter_get_basic(&sub, &rc); |
| 185 | - return (int) rc; | |
| 185 | + return (unsigned int) rc; | |
| 186 | 186 | |
| 187 | 187 | } |
| 188 | + | |
| 188 | 189 | dbus_message_iter_next(&sub); |
| 189 | 190 | } |
| 190 | 191 | |
| ... | ... | @@ -218,6 +219,8 @@ |
| 218 | 219 | |
| 219 | 220 | while ((current_type = dbus_message_iter_get_arg_type(&sub)) != DBUS_TYPE_INVALID) { |
| 220 | 221 | |
| 222 | + debug("Current_type=",(char) current_type); | |
| 223 | + | |
| 221 | 224 | if (current_type == DBUS_TYPE_INT32) { |
| 222 | 225 | |
| 223 | 226 | dbus_int32_t rc = 0; | ... | ... |
client/src/session/remote/properties.cc
| ... | ... | @@ -110,7 +110,7 @@ |
| 110 | 110 | |
| 111 | 111 | unsigned short IPC::Session::getScreenWidth() const { |
| 112 | 112 | |
| 113 | - int value; | |
| 113 | + uint32_t value; | |
| 114 | 114 | getProperty("width",value); |
| 115 | 115 | return (unsigned short) value; |
| 116 | 116 | |
| ... | ... | @@ -118,7 +118,7 @@ |
| 118 | 118 | |
| 119 | 119 | unsigned short IPC::Session::getScreenHeight() const { |
| 120 | 120 | |
| 121 | - int value; | |
| 121 | + uint32_t value; | |
| 122 | 122 | getProperty("height",value); |
| 123 | 123 | return (unsigned short) value; |
| 124 | 124 | |
| ... | ... | @@ -126,7 +126,7 @@ |
| 126 | 126 | |
| 127 | 127 | unsigned short IPC::Session::getScreenLength() const { |
| 128 | 128 | |
| 129 | - int value; | |
| 129 | + uint32_t value; | |
| 130 | 130 | getProperty("length",value); |
| 131 | 131 | return (unsigned short) value; |
| 132 | 132 | ... | ... |
client/src/testprogram/testprogram.cc
| ... | ... | @@ -103,6 +103,7 @@ |
| 103 | 103 | << "Connection state is " << toCharString(host.getConnectionState()) << std::endl |
| 104 | 104 | << "Program message is " << toCharString(host.getProgramMessage()) << std::endl |
| 105 | 105 | << "Luname is " << host.getLUName() << std::endl |
| 106 | + << "Screen size is " << host.getScreenWidth() << "x" << host.getScreenHeight() << " (" << host.getScreenLength() << ")" | |
| 106 | 107 | << std::endl; |
| 107 | 108 | |
| 108 | 109 | if(host) { | ... | ... |
server/pw3270-plugin-ipc.cbp
| ... | ... | @@ -58,8 +58,6 @@ |
| 58 | 58 | <Linker> |
| 59 | 59 | <Add option="`pkg-config --libs gtk+-3.0 lib3270 v3270 gio-2.0 dbus-1 dbus-glib-1`" /> |
| 60 | 60 | </Linker> |
| 61 | - <Unit filename="../common/src/include/lib3270/ipc-glib.h" /> | |
| 62 | - <Unit filename="../common/src/include/lib3270/ipc.h" /> | |
| 63 | 61 | <Unit filename="src/core/constants.c"> |
| 64 | 62 | <Option compilerVar="CC" /> |
| 65 | 63 | </Unit> |
| ... | ... | @@ -130,6 +128,7 @@ |
| 130 | 128 | <Option compilerVar="CC" /> |
| 131 | 129 | </Unit> |
| 132 | 130 | <Unit filename="src/include/config.h.in" /> |
| 131 | + <Unit filename="src/include/ipc-glib.h" /> | |
| 133 | 132 | <Unit filename="src/plugin/plugin.c"> |
| 134 | 133 | <Option compilerVar="CC" /> |
| 135 | 134 | </Unit> | ... | ... |